Commit c4e3cca1 authored by Junio C Hamano's avatar Junio C Hamano Committed by Linus Torvalds

[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: default avatarJunio C Hamano <[email protected]>

Fixed to do the right thing at the end.
Signed-off-by: default avatarLinus Torvalds <[email protected]>
parent 8f41523f
......@@ -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))
return 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment