Re: [PATCH 2/3] parse_hide_refs_config: handle NULL section
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 14, 2018, 02:11 UTC
- Message-ID
- <xmqqk1kceu23.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20181211104358.GB7233@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 7 quoted lines
> This helper function looks for config in two places: transfer.hiderefs, > or $section.hiderefs, where $section is passed in by the caller (and is > "uploadpack" or "receive", depending on the context). > > In preparation for callers which do not even have that context (namely > the "git-serve" command), let's handle a NULL by looking only at > transfer.hiderefs (as opposed to segfaulting).
Makes sense, and I too wonder if we want to keep the "serve" thing in the longer term, at least in the current form.