test-pkt-line: introduce a packet-line test helper
[gitweb.git] / merge-recursive.c
index a4c280dfc78e943ec541f83ccb0b39921ccdf2b2..2ecf495cc2a4a6d4544b92db1d2a8c3c0cc36f87 100644 (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))