From 250654253f3daeced6c521209827f378279552b4 Mon Sep 17 00:00:00 2001 From: Barak Amar Date: Tue, 20 Apr 2021 13:28:19 +0300 Subject: [PATCH] webui: use first parent for diff of merge commit --- .../pages/repositories/repository/commits/commit/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/webui/src/pages/repositories/repository/commits/commit/index.js b/webui/src/pages/repositories/repository/commits/commit/index.js index 5ed3216c130..bbd714e0596 100644 --- a/webui/src/pages/repositories/repository/commits/commit/index.js +++ b/webui/src/pages/repositories/repository/commits/commit/index.js @@ -23,8 +23,7 @@ import {useRouter} from "../../../../../lib/hooks/router"; const ChangeList = ({ repo, commit, after, onPaginate }) => { const {results, loading, error, nextPage} = useAPIWithPagination(async() => { if (!commit.parents || commit.parents.length === 0) return {results: [], pagination: {has_more: false}}; - // TODO (ozkatz): change after fixing https://github.com/treeverse/lakeFS/issues/1730 - return refs.diff(repo.id, commit.id, commit.parents[(commit.parents.length === 2) ? 1 : 0], after); + return refs.diff(repo.id, commit.id, commit.parents[0], after); }, [repo.id, commit.id, after]); if (!!loading) return ; @@ -229,4 +228,4 @@ const RepositoryCommitPage = () => { ) } -export default RepositoryCommitPage; \ No newline at end of file +export default RepositoryCommitPage;