{"thread":{"id":"5188","subject":"[PATCH] merge-recur: do not die unnecessarily","startedAt":"2006-08-09T20:31:49Z","lastAt":"2006-08-09T20:31:49Z","messageCount":1,"participants":["Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"25051","messageId":"Pine.LNX.4.63.0608092231260.13885@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"5188","inReplyTo":null,"subject":"[PATCH] merge-recur: do not die unnecessarily","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-08-09T20:31:49Z","receivedAt":"2006-08-09T20:31:49Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nWhen the cache is dirty, and we switch the index file from temporary\nto final, we want to discard the cache without complaint.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n merge-recursive.c |    6 ++++--\n 1 files changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/merge-recursive.c b/merge-recursive.c\nindex 2d3ab4f..be97752 100644\n--- a/merge-recursive.c\n+++ b/merge-recursive.c\n@@ -139,8 +139,10 @@ static int flush_cache(void)\n static void setup_index(int temp)\n {\n \tcurrent_index_file = temp ? temporary_index_file: original_index_file;\n-\tif (cache_dirty)\n-\t\tdie(\"fatal: cache changed flush_cache();\");\n+\tif (cache_dirty) {\n+\t\tdiscard_cache();\n+\t\tcache_dirty = 0;\n+\t}\n \tunlink(temporary_index_file);\n \tdiscard_cache();\n }\n-- \n1.4.2.rc3.g29d0-dirty\n"}]}