git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] merge-recur: do not die unnecessarily

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 9, 2006, 20:31 UTC
Message-ID
<Pine.LNX.4.63.0608092231260.13885@wbgn013.biozentrum.uni-wuerzburg.de>

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>
---
 merge-recursive.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/merge-recursive.c b/merge-recursive.c
index 2d3ab4f..be97752 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();
 }
-- 
1.4.2.rc3.g29d0-dirty
Message 1 of 1 in “merge-recur: do not die unnecessarily”
  1. merge-recur: do not die unnecessarilyJohannes Schindelin, Aug 9, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.