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

Re: Why 10k remotes? Was: Re: [RFC/PATCH 0/5] remote: eliminate remote->{fetch,push}_refspec and lazy parsing of refspecs

From
Jeff King <peff@peff.net>
Date
Jun 21, 2017, 16:00 UTC
Message-ID
<20170621160018.dysakibspeiv3gqr@sigill.intra.peff.net>
In-Reply-To
<CAM0VKjnfVuVnUfnfCceD-QfUdj=6sWTdBDXkj9jZujqMJqdAQA@mail.gmail.com>
On Wed, Jun 21, 2017 at 02:21:19AM +0200, SZEDER Gábor wrote:
Show 7 quoted lines
>   Such an all-forks-in-one repo allows me to run e.g. 'git log --all
>   -p master.. relevant.c' and then search its output for changes in
>   interesting functions (thankfully function names are included in
>   hunk headers; alas line log doesn't work with --all).  Occasionally
>   this unearths some treasures: other people's commits and branches
>   scratching the same itch that I was about to scratch, or at least
>   solving part of my problem and I can build on top of them.)
OK, that's indeed an interesting use case.
Show 7 quoted lines
> > Now instead we
> > pass the refspecs directly to fetch whenever move objects between the
> > storage repos. They were the same for every remote anyway (and I'd guess
> > that is true, too, of your 10k remotes).
> 
> I do have different fetch refspecs for every remote, i.e. the repo
> 'github.com/user/repo' has '+refs/heads/*:refs/forks/user/repo/*'.

Right, ours have different refspecs, too. But they can be generated programatically. So we just do:

  git fetch ../$id +refs/*:refs/forks/$id/*
without bothering to have a configured remote.
-Peff
Previous: SZEDER Gábor
Message 2 of 2 in “Why 10k remotes? Was: Re: [RFC/PATCH 0/5] remote: eliminate remote->{fetch,push}_refspec and lazy parsing of refspecs”
  1. SZEDER GáborJun 21, 2017
  2. Jeff KingJun 21, 2017

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.