aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--update-cache.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/update-cache.c b/update-cache.c
index 0401372e4..bb25fa114 100644
--- a/update-cache.c
+++ b/update-cache.c
@@ -306,6 +306,15 @@ int main(int argc, char **argv)
i += 3;
continue;
}
+ if (!strcmp(path, "--force-remove")) {
+ if (argc <= i + 1)
+ die("update-cache: --force-remove <path>");
+ if (remove_file_from_cache(argv[i+1]))
+ die("update-cache: --force-remove cannot remove %s", argv[i+1]);
+ i++;
+ continue;
+ }
+
if (!strcmp(path, "--ignore-missing")) {
not_new = 1;
continue;