Re: [bug in next ?] git-fetch/git-push issue
- From
Jeff King <peff@peff.net>
- Date
- Nov 5, 2007, 21:07 UTC
- Message-ID
- <20071105210711.GA9176@sigill.intra.peff.net>
- In-Reply-To
- <Pine.LNX.4.64.0711051259580.7357@iabervon.org>
On Mon, Nov 05, 2007 at 01:17:14PM -0500, Daniel Barkalow wrote:
Show 6 quoted lines
> I think this is the bit that's wrong. I blame Jeff, in 334f4831. :) > > The issue is that, in the previous version, we'd hit a continue on the > not-an-ancestor message and not reach the update_tracking_ref() section > for that ref. In 334f4831, all of the updating is after the loop, and it > doesn't filter out the refs that didn't actually get pushed.
Nope, that's not the problem. We _only_ update any tracking refs at all if ret == 0, and if we fail to push, then we are setting ret to -2.
Hrm. Oh wait, it looks like we then totally write over the current value of 'ret' when we do pack_objects. Oops.
I'm unclear how to fix this, as I'm not really sure what ret is _supposed_ to be communicating. What does the '-2' mean, as compared to a '-4'? Should we be doing a 'ret += pack_objects(out, remote_refs)' or some other bit-masking magic?
-Peff