Re: [PATCH/RFC 1/3] send-pack: track errors for each ref

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeff King
Date: Tuesday, November 13, 2007 - 4:32 am

On Tue, Nov 13, 2007 at 05:27:09AM -0500, Jeff King wrote:


Argh, this fails t5400 quite badly without the following patch:

---
diff --git a/builtin-send-pack.c b/builtin-send-pack.c
index 3ac2615..eff84e0 100644
--- a/builtin-send-pack.c
+++ b/builtin-send-pack.c
@@ -421,6 +421,16 @@ static int do_send_pack(int in, int out, struct remote *remote, const char *dest
 
 	if (!new_refs)
 		fprintf(stderr, "Everything up-to-date\n");
+	for (ref = remote_refs; ref; ref = ref->next) {
+		switch (ref->status) {
+		case REF_STATUS_NONE:
+		case REF_STATUS_UPTODATE:
+		case REF_STATUS_OK:
+			break;
+		default:
+			return -1;
+		}
+	}
 	return 0;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC/PATCH 0/3] tracking per-ref errors on push, Jeff King, (Tue Nov 13, 3:25 am)
Re: [PATCH/RFC 1/3] send-pack: track errors for each ref, Jeff King, (Tue Nov 13, 4:32 am)
Re: [RFC/PATCH 0/3] tracking per-ref errors on push, Jeff King, (Tue Nov 13, 4:34 am)
[PATCH v2 1/3] send-pack: track errors for each ref, Jeff King, (Tue Nov 13, 4:36 am)
Re: [PATCH v2 3/3] send-pack: assign remote errors to each ref, Johannes Schindelin, (Tue Nov 13, 7:01 pm)