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

Re: [PATCH 0/3] Eliminate one user of extra_refs

From
Jeff King <peff@peff.net>
Date
Jan 6, 2012, 14:53 UTC
Message-ID
<20120106145356.GB4525@sigill.intra.peff.net>
In-Reply-To
<1325859153-31016-1-git-send-email-mhagger@alum.mit.edu>
On Fri, Jan 06, 2012 at 03:12:30PM +0100, mhagger@alum.mit.edu wrote:
Show 10 quoted lines
> Receive pack currently uses "extra refs" to keep track of ".have"
> references, which in turn are used to tell the source the SHA1s of
> references that are already known to the repository via alternates.
> 
> But the code already creates an array holding the alternate SHA1s.  So
> just read the SHA1s out of this array rather then round-tripping them
> through the extra_refs mechanism.
> 
> This is one step towards hopefully abolishing extra_refs altogether.
> I still have to examine the other user.

Thanks, this is a nice simplification. The patches look good to me, and they produce the same output for a simple test (I happened to be fiddling with receive-pack and alternates yesterday, so I had a nice test case right at hand :) ).

>   receive-pack: move more work into write_head_info()

BTW, I have a patch to make sending ".have" refs configurable[1] (it adds a receive.advertiseAlternates config variable), which this patch conflicts with. I don't think that is your problem, but I thought I would mention it since you are working in the area. Is that something we want in git?

-Peff
[1] We are using it at GitHub because our alternates repos are so huge
    that the overhead of advertising the refs outweighs the minor
    benefits you get from avoiding object transfer.
Previous: Junio C Hamano
Message 7 of 7 in “Eliminate one user of extra_refs”
  1. 0/3 Eliminate one user of extra_refsmhagger@alum.mit.edu, Jan 6, 2012
  2. 1/3 receive-pack: move more work into write_head_info()mhagger@alum.mit.edu, Jan 6, 2012
  3. 2/3 show_ref(): remove unused "flag" and "cb_data" argumentsmhagger@alum.mit.edu, Jan 6, 2012
  4. Junio C HamanoJan 7, 2012
  5. 3/3 write_head_info(): handle "extra refs" locallymhagger@alum.mit.edu, Jan 6, 2012
  6. Junio C HamanoJan 6, 2012
  7. Jeff KingJan 6, 2012

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.