author | Junio C Hamano <gitster@pobox.com> | |
Fri, 31 Jul 2009 00:38:15 +0000 (17:38 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 31 Jul 2009 02:25:05 +0000 (19:25 -0700) | ||
commit | c94736a27f89bfc268aed0de7264deecdc136a58 | |
tree | e8307e0e18ce73552f826928d5bcd85325e366e8 | tree | snapshot |
parent | 4258c212ca2c3674be4b7e00a19db705eee77a48 | commit | diff |
merge-recursive: don't segfault while handling rename clashes
When a branch moves A to B while the other branch created B (or moved C to
B), the code tried to rename one of them to B~something to preserve both
versions, and failed to register temporary resolution for the original
path B at stage#0 during virtual ancestor computation. This left the
index in unmerged state and caused a segfault.
A better solution is to merge these two versions of B's in place and use
the (potentially conflicting) result as the intermediate merge result in
the virtual ancestor.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When a branch moves A to B while the other branch created B (or moved C to
B), the code tried to rename one of them to B~something to preserve both
versions, and failed to register temporary resolution for the original
path B at stage#0 during virtual ancestor computation. This left the
index in unmerged state and caused a segfault.
A better solution is to merge these two versions of B's in place and use
the (potentially conflicting) result as the intermediate merge result in
the virtual ancestor.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-recursive.c | diff | blob | history | |
t/t6036-recursive-corner-cases.sh | [new file with mode: 0755] | blob |