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

Re: [PATCH] check_everything_connected: assume alternate ref tips are valid

From
Derrick Stolee <stolee@gmail.com>
Date
Jul 1, 2019, 12:26 UTC
Message-ID
<5c38cb79-bc04-db10-12b9-7e4f83f836c4@gmail.com>
In-Reply-To
<20190629075536.GB5080@sigill.intra.peff.net>
On 6/29/2019 3:55 AM, Jeff King wrote:
Show 35 quoted lines
> On Fri, Jun 28, 2019 at 09:22:56AM -0700, Junio C Hamano wrote:
> 
>>>  	argv_array_push(&rev_list.args, "--quiet");
>>> +	argv_array_push(&rev_list.args, "--alternate-refs");
>>>  	if (opt->progress)
>>>  		argv_array_pushf(&rev_list.args, "--progress=%s",
>>>  				 _("Checking connectivity"));
>>
>> Quite honestly, I am very surprised that we did not do this.  The
>> idea of alternate object store, as well as reducing transfer cost by
>> advertising their tips as '.have' phony refs, is almost as old as
>> the pack protocol itself.
> 
> Yeah, as you note we are already telling the other side of the push
> "hey, we already have these objects". So we are almost always just
> walking over our own local objects in the connectivity check, which is
> silly.
> 
> I only did "clone --reference" in the perf test because it was the
> simplest, but a push to a server with alternates should be similarly
> improved. E.g., doing this in a clone of linux.git:
> 
>   git init --bare dst.git
>   echo '../../.git/objects' >dst.git/objects/info/alternates
>   time git push dst.git HEAD
> 
> goes from 40+ seconds to 100ms or so. Again, obviously that's the best
> case, but it should also improve the normal case of somebody pulling
> down "torvalds/linux.git" and pushing it back up to their own
> "peff/linux.git", too.
> 
> I don't have real-world numbers yet from GitHub, because we're not
> actually advertising .haves on push right now. All of the Git pieces are
> now in places to do so, but we still have to make some tweaks at our
> replication layer. But soon. :)

Exciting! Should improve the user's experience keeping their forks updated!

-Stolee
Previous: Jeff King
Message 20 of 20 in “check_everything_connected: assume alternate ref tips are valid”
  1. check_everything_connected: assume alternate ref tips are validJeff King, Jun 28, 2019
  2. Jeff KingJun 28, 2019
  3. Derrick StoleeJun 28, 2019
  4. Jeff KingJun 29, 2019
  5. Derrick StoleeJul 1, 2019
  6. Jeff KingJul 1, 2019
  7. Jeff KingJul 1, 2019
  8. 1/2 object-store.h: move for_each_alternate_ref() from transport.hJeff King, Jul 1, 2019
  9. Derrick StoleeJul 1, 2019
  10. 2/2 check_everything_connected: assume alternate ref tips are validJeff King, Jul 1, 2019
  11. SZEDER GáborJul 3, 2019
  12. Jeff KingJul 3, 2019
  13. Junio C HamanoJul 3, 2019
  14. SZEDER GáborJul 3, 2019
  15. Junio C HamanoJul 3, 2019
  16. Taylor BlauJul 1, 2019
  17. Jeff KingJul 2, 2019
  18. Junio C HamanoJun 28, 2019
  19. Jeff KingJun 29, 2019
  20. Derrick StoleeJul 1, 2019

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.