Re: [PATCH 2/2] Revert "repository: pre-initialize hash algo pointer"
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 23, 2018, 22:26 UTC
- Message-ID
- <xmqqfu5rs5qb.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <CAGZ79kZUyo-C8FvphXh8dO8s0V5-Sa=fP=faXEiyD3xSezQsRw@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 16 quoted lines
> On Fri, Feb 23, 2018 at 11:50 AM, Junio C Hamano <gitster@pobox.com> wrote: >> Stefan Beller <sbeller@google.com> writes: >> >>> I wonder if there is yet another missing case in the enumeration of >>> the previous patch: >>> Some commands are able to operate on GIT_OBJECT_DIR instead >>> of GIT_DIR (git repack?), which may not even explore the full git directory, >>> and so doesn't know about the hash value. >> >> ... because GIT_DIR/config is not known? "repack" is not one of >> them, though---it needs to at least use refs as the starting point >> so a standalone OBJECT_DIR is insufficient. > > Yes, I could have worded this as a question: > Is there any command that operates on GIT_OBJECT_DIR > without trying to discover GIT_DIR ?
If somebody finds one that would be a good argument not to pursue the approach. Lack of response to the question would not amount to that much---it is possible all people who bothered to think of overlooked something obvious, though. "When I asked around nobody thought of a possibly way for this to cause breakages, so let's declare it is safe to do so and do it" is not how we want to do things X-<.