Skip to content

Commit 6d2c461

Browse files
committed
Merge branch 'en/merge-recursive-icase-removal'
The code internal to the recursive merge strategy was not fully prepared to see a path that is renamed to try overwriting another path that is only different in case on case insensitive systems. This does not matter in the current code, but will start to matter once the rename detection logic starts taking hints from nearby paths moving to some directory and moves a new path along with them. * en/merge-recursive-icase-removal: merge-recursive: ignore_case shouldn't reject intentional removals
2 parents 6466854 + 4cba2b0 commit 6d2c461

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

merge-recursive.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ static int remove_file(struct merge_options *o, int clean,
646646
if (ignore_case) {
647647
struct cache_entry *ce;
648648
ce = cache_file_exists(path, strlen(path), ignore_case);
649-
if (ce && ce_stage(ce) == 0)
649+
if (ce && ce_stage(ce) == 0 && strcmp(path, ce->name))
650650
return 0;
651651
}
652652
if (remove_path(path))

0 commit comments

Comments
 (0)