summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8f41523)
raw | patch | inline | side by side (parent: 8f41523)
author | Junio C Hamano <junkio@cox.net> | |
Sun, 17 Apr 2005 16:53:35 +0000 (09:53 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Sun, 17 Apr 2005 16:53:35 +0000 (09:53 -0700) |
When update-cache --remove is run, resolve unmerged state for
the path. This is consistent with the update-cache --add
behaviour. Essentially, the user is telling us how he wants to
resolve the merge by running update-cache.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Fixed to do the right thing at the end.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
the path. This is consistent with the update-cache --add
behaviour. Essentially, the user is telling us how he wants to
resolve the merge by running update-cache.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Fixed to do the right thing at the end.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
read-cache.c | patch | blob | history |
diff --git a/read-cache.c b/read-cache.c
index 21f6e8e4d5350d405e210c42c6d005eb314275ba..03d49e1026282d51c93c0a1b6ea1bdd16f41fc49 100644 (file)
--- a/read-cache.c
+++ b/read-cache.c
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;
}