git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Aug 12, 2024, 21:05 UTC
Message-ID
<Zrp5JnsVHbqs4TyN@tapette.crustytoothpaste.net>
In-Reply-To
<20240812114733.GA3732689@coredump.intra.peff.net>
On 2024-08-12 at 11:47:33, Jeff King wrote:
Show 13 quoted lines
> So one option is to just do that check earlier. But that leaves other
> sub-commands of "git bundle":
> 
>   - "create" likewise requires a repo, and seems OK. That makes sense
>     since we're not reading anything.
> 
>   - "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.
> 
>   - 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.

If the bundle is v2, it's SHA-1. If the bundle is v3, then it should have a an @object-format= header, which is sufficient to set the hash algorithm. The default for v3 is still SHA-1, but we have never emitted a v3 bundle without an object-format header (except for maybe a commit or two somewhere in the history).

-- 
brian m. carlson (they/them or he/him)
Toronto, Ontario, CA
Previous: Junio C HamanoNext: Patrick Steinhardt
Message 4 of 10 in “SIGSEGV Error Occurs When Attempting to Unbundle Without Initializing Git Repository.”
  1. ArcticLampyridAug 12, 2024
  2. Jeff KingAug 12, 2024
  3. Junio C HamanoAug 12, 2024
  4. brian m. carlsonAug 12, 2024
  5. 0/2 bundle: fix handling of object formatPatrick Steinhardt, Aug 13, 2024
  6. 1/2 builtin/bundle: have unbundle check for repo before opening its bundlePatrick Steinhardt, Aug 13, 2024
  7. Eric SunshineAug 13, 2024
  8. 2/2 bundle: default to SHA1 when reading bundle headersPatrick Steinhardt, Aug 13, 2024
  9. Jeff KingAug 13, 2024
  10. Junio C HamanoAug 13, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.