[PATCH] update-cache --remove marks the path merged.
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>
This commit is contained in:
parent
8f41523fc1
commit
c4e3cca1f7
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user