Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
[PATCH] update-cache --remove marks the path merged.
[gitweb.git]
/
read-cache.c
diff --git
a/read-cache.c
b/read-cache.c
index 21f6e8e4d5350d405e210c42c6d005eb314275ba..03d49e1026282d51c93c0a1b6ea1bdd16f41fc49 100644
(file)
--- a/
read-cache.c
+++ b/
read-cache.c
@@
-369,7
+369,9
@@
static int remove_entry_at(int pos)
int remove_file_from_cache(char *path)
{
int pos = cache_name_pos(path, strlen(path));
- if (pos >= 0)
+ if (pos < 0)
+ pos = -pos-1;
+ while (pos < active_nr && !strcmp(active_cache[pos]->name, path))
remove_entry_at(pos);
return 0;
}