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