summaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2006-08-09 22:31:49 +0200
committerJunio C Hamano <junkio@cox.net>2006-08-09 14:57:27 -0700
commit984b65707e25c426a32feb9b9d46f077b605cb31 (patch)
tree0d2c7afe34844fd1ff9016909978ed4e6e641ad7 /merge-recursive.c
parent8918b0c9c2667c5a69461955135c709b09561f72 (diff)
downloadgit-984b65707e25c426a32feb9b9d46f077b605cb31.tar.gz
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 <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c6
1 files 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();
}