git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] checkout-cache -a should not extract unmerged stages
@ 2005-04-17  5:30 Junio C Hamano
  2005-04-17 22:00 ` (Resend) " Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Junio C Hamano @ 2005-04-17  5:30 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: git

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;
 	}


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-04-17 21:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-17  5:30 [PATCH] checkout-cache -a should not extract unmerged stages Junio C Hamano
2005-04-17 22:00 ` (Resend) " Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).