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
This commit is contained in:
Junio C Hamano 2017-12-19 11:33:55 -08:00
commit 6d2c4619a5

View file

@ -646,7 +646,7 @@ static int remove_file(struct merge_options *o, int clean,
if (ignore_case) {
struct cache_entry *ce;
ce = cache_file_exists(path, strlen(path), ignore_case);
if (ce && ce_stage(ce) == 0)
if (ce && ce_stage(ce) == 0 && strcmp(path, ce->name))
return 0;
}
if (remove_path(path))