Commit 96ecac6
merge-recursive: Avoid excessive output for and reprocessing of renames
In 5a2580d (merge_recursive: Fix renames across paths below D/F conflicts
2010-07-09) and ae74548 (merge-recursive: Fix multiple file rename across
D/F conflict 2010-08-17), renames across D/F conflicts were fixed by
making process_renames() consider as unprocessed renames whose dst_entry
"still" had higher stage entries. The assumption was that those higher
stage entries would have been cleared out of dst_entry by that point in
cases where the conflict could be resolved (normal renames with no D/F
conflicts). That is not the case -- higher stage entries will remain in
all cases.
Fix this by checking for higher stage entries corresponding to D/F
conflicts, namely that stages 2 and 3 have exactly one nonzero mode between
them. The nonzero mode stage corresponds to a file at the path, while the
stage with a zero mode will correspond to a directory at that path (since
rename/delete conflicts will have already been handled before this codepath
is reached.)
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent ae74548 commit 96ecac6
1 file changed
Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1020 | 1020 | | |
1021 | 1021 | | |
1022 | 1022 | | |
1023 | | - | |
1024 | 1023 | | |
1025 | 1024 | | |
1026 | 1025 | | |
| |||
1032 | 1031 | | |
1033 | 1032 | | |
1034 | 1033 | | |
1035 | | - | |
1036 | | - | |
1037 | | - | |
| 1034 | + | |
| 1035 | + | |
1038 | 1036 | | |
1039 | | - | |
1040 | | - | |
1041 | 1037 | | |
1042 | 1038 | | |
1043 | 1039 | | |
| |||
0 commit comments