use strip_suffix instead of ends_with in simple cases
[gitweb.git] / merge-recursive.c
index 41770929420da4cba934b0b86b9cd2f55f9cab31..cab16fafb5c2b7792c78d3a7fbace1f43ab099cc 100644 (file)
@@ -589,6 +589,12 @@ static int remove_file(struct merge_options *o, int clean,
                        return -1;
        }
        if (update_working_directory) {
+               if (ignore_case) {
+                       struct cache_entry *ce;
+                       ce = cache_file_exists(path, strlen(path), ignore_case);
+                       if (ce && ce_stage(ce) == 0)
+                               return 0;
+               }
                if (remove_path(path))
                        return -1;
        }