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

Alternates advertisement on GitHub

From
Taylor Blau <me@ttaylorr.com>
Date
Jul 26, 2019, 03:18 UTC
Message-ID
<20190726031840.GB23056@TaylorsMBP9145.attlocal.net>
Hi everybody,

Pushes to forks of git.git hosted on GitHub now advertise the tips of git.git as well as branches from your fork.

You may recall that Peff and I have sent a handful of patches to allow repositories to customize how they gather references to advertise from an alternate, and then to use those alternate tips as part of the connectivity check (in [1] and [2], respectively).

GitHub used to advertise '.have's on pushes to forked repositories, but hasn't done so since 2012. We aggregate data from all forks into a 'network.git', and expose the tips of each fork as:

  refs/remotes/<fork-id>/<refname>

Each fork lists the 'network.git' as its alternate, and thus the advertisement can get prohibitively large when there are many forks of a repository.

Michael Haggerty's work on packed refs makes finding references pertaining only to the root computationally efficient, and [1] makes it possible to filter down when computing the set of references to advertise. With [1], we can specify that computation exactly and only advertise branch tips from the root of a fork network.

We've been slowly rolling this out to a handful of repository networks, including forks of git.git hosted on GitHub. If you host your fork on GitHub, you shouldn't notice anything. Hopefully, pushes to your fork will result in smaller packfiles. In either case, nothing should break; if it does, please feel free to email me, or support@github.com.

Thanks as well for reviewing both [1] and [2], and making this work possible. Enjoy :-).

Thanks, Taylor

[1]: https://public-inbox.org/git/cover.1537466087.git.me@ttaylorr.com/ [2]: https://public-inbox.org/git/20190628101131.GA22862@sigill.intra.peff.net/

Next: Derrick Stolee
Message 1 of 3 in “Alternates advertisement on GitHub”
  1. Taylor BlauJul 26, 2019
  2. Derrick StoleeJul 26, 2019
  3. Taylor BlauJul 26, 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.