Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
merge-recur: do not die unnecessarily
author
Johannes Schindelin
<Johannes.Schindelin@gmx.de>
Wed, 9 Aug 2006 20:31:49 +0000
(22:31 +0200)
committer
Junio C Hamano
<junkio@cox.net>
Wed, 9 Aug 2006 21:57:27 +0000
(14:57 -0700)
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>
merge-recursive.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
8918b0c
)
diff --git
a/merge-recursive.c
b/merge-recursive.c
index 9281cd183a8913278f0944c4dc5da9b520d8274b..454e2935780ced518b85869b36d0a62d8129e89c 100644
(file)
--- 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();
}