mirror of
https://github.com/git/git
synced 2024-10-06 00:29:28 +00:00
Implement git-update-cache --force-remove <path>
This new flag tells git-update-cache to remove the named path even when the work tree still happens to have the file. It is used to update git-merge-one-file-script not to smudge the work tree. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
74400e7175
commit
0ff5bf7cfc
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue