Jeff King [off-list ref] writes:
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.