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

Re: [PATCH] push: fix local refs update if already up-to-date

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 4, 2008, 08:38 UTC
Message-ID
<7v7i7jsx6a.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20081104042643.GA31276@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Though I am not happy that we have to look up the tracking ref for every
> uptodate ref. I think it shouldn't be a big performance problem with
> packed refs, though, since they are cached (i.e., we pay only to compare
> the hashes, not touch the filesystem for each ref).

It is either (1) the user pays the cost of finding what remote tracking branch we are mirroring when you push for all up-to-date refs, like you did in your "here is an improvement" patch; or (2) the user pays the cost of fetching from there, immediately after pushing. I'd imagine that the cost to do (1) would be smaller than (2). The question is if seeing stale tracking branches is such a big deal, as next "git fetch" from there will update them anyway. If it is a big deal, (1) would be a price worth paying.

In short, I agree with everything you said in your analysis. Thanks for being a very good reviewer.

Clemens, care to reroll the patch?
Previous: Jeff KingNext: Clemens Buchacher
Message 3 of 14 in “push: fix local refs update if already up-to-date”
  1. push: fix local refs update if already up-to-dateClemens Buchacher, Nov 4, 2008
  2. Jeff KingNov 4, 2008
  3. Junio C HamanoNov 4, 2008
  4. Clemens BuchacherNov 4, 2008
  5. Clemens BuchacherNov 4, 2008
  6. Jeff KingNov 5, 2008
  7. Clemens BuchacherNov 5, 2008
  8. 1/2 do not force write of packed refsClemens Buchacher, Nov 5, 2008
  9. 2/2 push: fix local refs update if already up-to-dateClemens Buchacher, Nov 5, 2008
  10. Clemens BuchacherNov 5, 2008
  11. Junio C HamanoNov 5, 2008
  12. Jeff KingNov 5, 2008
  13. push: fix local refs update if already up-to-dateClemens Buchacher, Nov 4, 2008
  14. Jeff KingNov 5, 2008

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.