diff options
author | Sverre Hvammen Johansen <hvammen+git@gmail.com> | 2008-07-13 12:13:55 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-07-14 00:53:54 +0400 |
commit | 3d1dd4728b83e4c08d9fa7aaf2aa946e1012e061 (patch) | |
tree | c16f233808218d861b069d481fc95265e2716c01 /t/t7600-merge.sh | |
parent | 3f4d1c639347317788f2c5080f89de53772499ce (diff) |
reduce_heads(): thinkofix
When comparing two commit objects for equality, it is sufficient to
compare their in-core pointers because the object layer guarantees the
uniqueness. However, comparing pointers to two "struct commit_list"
instances that point at the same commit does not make any sense.
Spotted by Sverre Hvammen Johansen who wrote an additional test to expose
the problem, fixed by Miklos Vajna.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7600-merge.sh')
-rwxr-xr-x | t/t7600-merge.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh index 72ef2e55d9..f035ea376e 100755 --- a/t/t7600-merge.sh +++ b/t/t7600-merge.sh @@ -479,4 +479,15 @@ test_expect_success 'merge log message' ' test_debug 'gitk --all' +test_expect_success 'merge c1 with c0, c2, c0, and c1' ' + git reset --hard c1 && + git config branch.master.mergeoptions "" && + test_tick && + git merge c0 c2 c0 c1 && + verify_merge file result.1-5 && + verify_parents $c1 $c2 +' + +test_debug 'gitk --all' + test_done |