aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-04-25 15:17:15 -0700
committerJunio C Hamano <gitster@pobox.com>2016-04-25 15:17:15 -0700
commitf276cae18799ac8df2495b93cf0359a413789891 (patch)
tree88b4e119a06608fff800400d59dd4ee51a58c64a /t
parent9058b8f043f5dd287b6587373f031d79694b6024 (diff)
parent40d71940b6a0dadb7873cce614992f1d71fcdfbd (diff)
downloadgit-f276cae18799ac8df2495b93cf0359a413789891.tar.gz
git-f276cae18799ac8df2495b93cf0359a413789891.tar.xz
Merge branch 'en/merge-trivial-fix'
When "git merge" notices that the merge can be resolved purely at the tree level (without having to merge blobs) and the resulting tree happens to already exist in the object store, it forgot to update the index, which lead to an inconsistent state for later operations. * en/merge-trivial-fix: builtin/merge.c: fix a bug with trivial merges t7605: add a testcase demonstrating a bug with trivial merges
Diffstat (limited to 't')
-rwxr-xr-xt/t7605-merge-resolve.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/t7605-merge-resolve.sh b/t/t7605-merge-resolve.sh
index 0cb9d11f2..5d56c3854 100755
--- a/t/t7605-merge-resolve.sh
+++ b/t/t7605-merge-resolve.sh
@@ -27,7 +27,7 @@ test_expect_success 'setup' '
git tag c3
'
-test_expect_success 'merge c1 to c2' '
+merge_c1_to_c2_cmds='
git reset --hard c1 &&
git merge -s resolve c2 &&
test "$(git rev-parse c1)" != "$(git rev-parse HEAD)" &&
@@ -41,6 +41,10 @@ test_expect_success 'merge c1 to c2' '
test 3 = $(git ls-files | wc -l)
'
+test_expect_success 'merge c1 to c2' "$merge_c1_to_c2_cmds"
+
+test_expect_success 'merge c1 to c2, again' "$merge_c1_to_c2_cmds"
+
test_expect_success 'merge c2 to c3 (fails)' '
git reset --hard c2 &&
test_must_fail git merge -s resolve c3