{"thread":{"id":"6217","subject":"[PATCH] rerere: Fix removal of already resolved path.","startedAt":"2007-01-04T08:09:08Z","lastAt":"2007-01-04T09:03:23Z","messageCount":2,"participants":["Junio C Hamano","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"30805","messageId":"7vlkkjmcwr.fsf@assigned-by-dhcp.cox.net","threadId":"6217","inReplyTo":null,"subject":"[PATCH] rerere: Fix removal of already resolved path.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-01-04T08:09:08Z","receivedAt":"2007-01-04T08:09:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"There was an obvious thinko in memmove() to remove an entry that\nwas resolved from the in-core data structure.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\n * If you were seeing mysterious \"Cannot open\" messages after\n   \"git merge\", \"git rebase\", and \"git am\" runs, this should fix\n   them.\n\n builtin-rerere.c |    7 +++----\n 1 files changed, 3 insertions(+), 4 deletions(-)\n\ndiff --git a/builtin-rerere.c b/builtin-rerere.c\nindex 7442498..079c0bd 100644\n--- a/builtin-rerere.c\n+++ b/builtin-rerere.c\n@@ -350,11 +350,10 @@ static int do_plain_rerere(struct path_list *rr, int fd)\n \t\tfprintf(stderr, \"Recorded resolution for '%s'.\\n\", path);\n \t\tcopy_file(path, rr_path(name, \"postimage\"));\n tail_optimization:\n-\t\tif (i < rr->nr - 1) {\n+\t\tif (i < rr->nr - 1)\n \t\t\tmemmove(rr->items + i,\n-\t\t\t\t\trr->items + i + 1,\n-\t\t\t\t\trr->nr - i - 1);\n-\t\t}\n+\t\t\t\trr->items + i + 1,\n+\t\t\t\tsizeof(rr->items[0]) * (rr->nr - i - 1));\n \t\trr->nr--;\n \t\ti--;\n \t}\n"},{"id":"30807","messageId":"Pine.LNX.4.63.0701041003040.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"6217","inReplyTo":"7vlkkjmcwr.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] rerere: Fix removal of already resolved path.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-01-04T09:03:23Z","receivedAt":"2007-01-04T09:03:23Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 4 Jan 2007, Junio C Hamano wrote:\n\n> There was an obvious thinko in memmove() to remove an entry that\n> was resolved from the in-core data structure.\n\nI keep making the same errors, don't I?\n\nSorry,\nDscho\n"}]}