On Mon, 5 Nov 2007, Jeff King wrote:That's possible, but I think we currently only care about per-ref stuff for whether we actually did a push to that ref, and we care about whether we had a failure that affects all refs, and we care (for the return value) whether we have any errors at all. I think it's actually very significant what commits made locally have or haven't been made public. How about this, in addition to my previous dropping peer_ref: diff --git a/builtin-send-pack.c b/builtin-send-pack.c index 947c42b..1b7206c 100644 --- a/builtin-send-pack.c +++ b/builtin-send-pack.c @@ -337,8 +343,10 @@ static int do_send_pack(int in, int out, struct remote *remote, int nr_refspec, } packet_flush(out); - if (new_refs && !args.dry_run) - ret = pack_objects(out, remote_refs); + if (new_refs && !args.dry_run) { + if (pack_objects(out, remote_refs)) + ret = -4; + } close(out); if (expect_status_report) { @@ -346,7 +354,7 @@ static int do_send_pack(int in, int out, struct remote *remote, int nr_refspec, ret = -4; } - if (!args.dry_run && remote && ret == 0) { + if (!args.dry_run && remote && ret != -4) { for (ref = remote_refs; ref; ref = ref->next) update_tracking_ref(remote, ref); } That is, -2 means that we've done less than was asked, but nothing blew up; -4 means something blew up. When we skip something, we drop peer_ref from it, so there's nothing to update (and it's dropped from the set of mappings, in case we cared further about it with respect to reporting the actions we actually took). Then we update all refs that were acted on if ret isn't -4, and we return non-zero if ret is either -2 or -4. -Daniel *This .sig left intentionally blank* - 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
| Martin Schwidefsky | Re: x86 arch updates also broke s390 |
| Chuck Ebbert | Why do so many machines need "noapic"? |
| Greg KH | Re: [BUG] 2.6.24-git usb reset problems |
| Rafael J. Wysocki | [Bug #11822] ACPI Warning (nspredef-0858): _SB_.PCI0.LPC_.EC__.BAT0._BIF: Return P... |
git: | |
| Nicolas Bock | error: cannot lock ref 'refs/remotes/origin/*' |
| Peter Karlsson | RCS keyword expansion |
| Matthieu Moy | git push to a non-bare repository |
| Oliver Kullmann | "bash: git-upload-pack: command not found" ?? |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Daniel Ouellet | identifying sparse files and get ride of them trick available? |
| Richard Stallman | Real men don't attack straw men |
| Christian Weisgerber | Re: libiconv problem |
| Dushan Tcholich | Re: ksoftirqd high cpu load on kernels 2.6.24 to 2.6.27-rc1-mm1 |
| Larry McVoy | Re: tcp bw in 2.6 |
| Jeff Garzik | Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
