Re: [PATCH v2 2/3] transport.c: introduce core.alternateRefsCommand
- From
Jeff King <peff@peff.net>
- Date
- Sep 21, 2018, 22:13 UTC
- Message-ID
- <20180921221317.GB11177@sigill.intra.peff.net>
- In-Reply-To
- <xmqqfty2v9qj.fsf@gitster-ct.c.googlers.com>
On Fri, Sep 21, 2018 at 02:09:08PM -0700, Junio C Hamano wrote:
Show 14 quoted lines
> > +test_expect_success 'setup' ' > > + test_commit one && > > + git update-ref refs/heads/a HEAD && > > + test_commit two && > > + git update-ref refs/heads/b HEAD && > > + test_commit three && > > + git update-ref refs/heads/c HEAD && > > + git clone --bare . fork && > > + git clone fork pusher && > > + ( > > + cd fork && > > + git config receive.advertisealternates true && > > Hmph. Do we have code to support this configuration variable?
Sorry, I should have caught that. Our existing solution is to disable alternates in the advertisement entirely (since the optimization backfires for us). So this line is a leftover from testing it against our fork, and should be dropped.
If anybody is interested, we can share those patches, though they're unsurprisingly trivial. I suspect we may end up discarding them if this custom-command thing works, but it's possible we'll still need to be able to shut them off completely for some truly pathological cases.
Show 5 quoted lines
> > + cat <<-EOF | git update-ref --stdin && > > Style: writing "<<-\EOF" instead would allow readers' eyes to > coast over without having to look for $variable_references in > the here-doc.
Also, useless-use-of-cat in the original, which could be:
git update-ref --stdin <<-\EOF
> [...]
Yeah, I second all the other bits you mentioned.
-Peff