{"thread":{"id":"73","subject":"[PATCH] update-cache --remove marks the path merged.","startedAt":"2005-04-17T06:00:13Z","lastAt":"2005-04-17T06:00:13Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"447","messageId":"7vpswu0wpe.fsf@assigned-by-dhcp.cox.net","threadId":"73","inReplyTo":null,"subject":"[PATCH] update-cache --remove marks the path merged.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-04-17T06:00:13Z","receivedAt":"2005-04-17T06:00:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"When update-cache --remove is run, resolve unmerged state for\nthe path.  This is consistent with the update-cache --add\nbehaviour.  Essentially, the user is telling us how he wants to\nresolve the merge by running update-cache.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\n read-cache.c |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletion(-)\n\nread-cache.c: e16c37403092e1e94c50b04685b6417405ffc724\n--- read-cache.c\n+++ read-cache.c\t2005-04-16 22:43:55.000000000 -0700\n@@ -368,7 +368,9 @@\n int remove_file_from_cache(char *path)\n {\n \tint pos = cache_name_pos(path, strlen(path));\n-\tif (pos >= 0)\n+\tif (pos < 0)\n+\t\tpos = -pos-1;\n+\twhile (! strcmp(active_cache[pos]->name, path))\n \t\tremove_entry_at(pos);\n \treturn 0;\n }\n\n"}]}