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>
This commit is contained in:

committed by
Junio C Hamano

parent
8918b0c9c2
commit
984b65707e
@ -139,8 +139,10 @@ static int flush_cache(void)
|
|||||||
static void setup_index(int temp)
|
static void setup_index(int temp)
|
||||||
{
|
{
|
||||||
current_index_file = temp ? temporary_index_file: original_index_file;
|
current_index_file = temp ? temporary_index_file: original_index_file;
|
||||||
if (cache_dirty)
|
if (cache_dirty) {
|
||||||
die("fatal: cache changed flush_cache();");
|
discard_cache();
|
||||||
|
cache_dirty = 0;
|
||||||
|
}
|
||||||
unlink(temporary_index_file);
|
unlink(temporary_index_file);
|
||||||
discard_cache();
|
discard_cache();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user