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

[PATCH] checkout-cache -a should not extract unmerged stages

From
Junio C Hamano <junkio@cox.net>
Date
Apr 17, 2005, 05:30 UTC
Message-ID
<7vy8bi0y2k.fsf@assigned-by-dhcp.cox.net>

When checkout-cache -a is run, currently it attempts to extract each existing unmerged stage to the same destination and complains to what it itself has done. This is nonsensical.

Presumably, the user is running checkout-cache -a in order to verify the result of the part that has cleanly been merged. So check out only stage 0 entries and give warnings for paths that are unmerged.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 checkout-cache.c |   11 +++++++++++
 1 files changed, 11 insertions(+)

checkout-cache.c: 431b7032576f40d93a08be801e26f76c168ed57b --- checkout-cache.c +++ checkout-cache.c 2005-04-16 22:23:15.000000000 -0700

@@ -121,10 +121,21 @@
 
 static int checkout_all(void)
 {
+	struct cache_entry *unmerge_skipping = NULL;
 	int i;
 
 	for (i = 0; i < active_nr ; i++) {
 		struct cache_entry *ce = active_cache[i];
+		if (ce_stage(ce)) {
+			if (!unmerge_skipping ||
+			    strcmp(unmerge_skipping->name, ce->name))
+				fprintf(stderr,
+					"checkout-cache: needs merge %s\n",
+					ce->name);
+			unmerge_skipping = ce;
+			continue;
+		}
+		unmerge_skipping = NULL;
 		if (checkout_entry(ce) < 0)
 			return -1;
 	}
Next: Junio C Hamano
Message 1 of 2 in “checkout-cache -a should not extract unmerged stages”
  1. checkout-cache -a should not extract unmerged stagesJunio C Hamano, Apr 17, 2005
  2. (Resend) [PATCH] checkout-cache -a should not extract unmerged stagesJunio C Hamano, Apr 17, 2005

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.