From 984b65707e25c426a32feb9b9d46f077b605cb31 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 9 Aug 2006 22:31:49 +0200 Subject: [PATCH] merge-recur: do not die unnecessarily When the cache is dirty, and we switch the index file from temporary to final, we want to discard the cache without complaint. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- merge-recursive.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/merge-recursive.c b/merge-recursive.c index 9281cd183a..454e293578 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -139,8 +139,10 @@ static int flush_cache(void) static void setup_index(int temp) { current_index_file = temp ? temporary_index_file: original_index_file; - if (cache_dirty) - die("fatal: cache changed flush_cache();"); + if (cache_dirty) { + discard_cache(); + cache_dirty = 0; + } unlink(temporary_index_file); discard_cache(); } -- 2.11.4.GIT