Subject: Re: SIGSEGV Error Occurs When Attempting to Unbundle Without Initializing Git Repository.

From: Junio C Hamano <[email-masked]>
Date: Mon, 12 Aug 2024 08:55:12 -0700

Jeff King <[email-masked]> writes:

>   - "verify" requires a repo, which I wouldn't have expected, but I
>     guess it's because we probably unbundle under the hood to walk.
>     Anyway, it gets the ordering right here and checks the repo before
>     opening the bundle.

In hindsight "verify" is misnamed and overrated.  Its purpose is to
check if the bundle can be unbundled into your _current_ repository
by checking if you have all the commits _required_ to unbundle the
bundle.

In fact, I doubt that "verify" looks at the pack stream part of the
file at all.

>   - list-heads doesn't require a repo, and segfaults. So it really does
>     need some kind of detection or default to know which hash to use.

Yes.