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

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
Previous: Daniel BarkalowNext: Daniel Barkalow
Message 3 of 16 in “[bug in next ?] git-fetch/git-push issue”
  1. Pierre HabouzitNov 5, 2007
  2. Daniel BarkalowNov 5, 2007
  3. Jeff KingNov 5, 2007
  4. Daniel BarkalowNov 5, 2007
  5. Jeff KingNov 5, 2007
  6. Junio C HamanoNov 5, 2007
  7. Daniel BarkalowNov 5, 2007
  8. Daniel BarkalowNov 5, 2007
  9. Jeff KingNov 6, 2007
  10. Pierre HabouzitNov 5, 2007
  11. Pierre HabouzitNov 6, 2007
  12. Jeff KingNov 6, 2007
  13. Junio C HamanoNov 6, 2007
  14. Jeff KingNov 6, 2007
  15. Pierre HabouzitNov 6, 2007
  16. Pierre HabouzitNov 7, 2007

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.