{"thread":{"id":"51171","subject":"git bundle verify segfaults","startedAt":"2019-05-24T17:48:40Z","lastAt":"2019-05-24T18:49:28Z","messageCount":2,"participants":["Konstantin Ryabitsev","SZEDER Gábor"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"376197","messageId":"20190524174835.GA2068@chatter.i7.local","threadId":"51171","inReplyTo":null,"subject":"git bundle verify segfaults","fromName":"Konstantin Ryabitsev","fromEmail":"konstantin@linuxfoundation.org","sentAt":"2019-05-24T17:48:35Z","receivedAt":"2019-05-24T17:48:40Z","isPatch":false,"sender":{"key":"konstantin@linuxfoundation.org","avatar":"https://gravatar.com/avatar/7cb8827c6de56e1bd2dea16508c6708aa43feed3bf3813bcdacecdf96ceadd79?d=mp&s=160"},"body":"Hello:\n\nI seem to be getting a segfault trying to verify bundles created from \nlinux.git. It's easy to reproduce:\n\n$ cd linux\n$ git show-ref master\nc50bbf615f2f0028ad1771506ef8807130ccc2ce refs/heads/master\n$ git bundle create /tmp/linux.bundle master\nEnumerating objects: 6705678, done.\nCounting objects: 100% (6705678/6705678), done.\nDelta compression using up to 8 threads\nCompressing objects: 100% (1037089/1037089), done.\nWriting objects: 100% (6705678/6705678), 1.19 GiB | 97.81 MiB/s, done.\nTotal 6705678 (delta 5657955), reused 6664576 (delta 5622679)\n$ cd /tmp\n$ git bundle verify linux.bundle\nBUG: refs.c:1750: attempting to get main_ref_store outside of repository\nAborted (core dumped)\n$ git --version\ngit version 2.21.0\n\nBest,\n-K\n"},{"id":"376200","messageId":"20190524184922.GJ951@szeder.dev","threadId":"51171","inReplyTo":"20190524174835.GA2068@chatter.i7.local","subject":"Re: git bundle verify segfaults","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2019-05-24T18:49:22Z","receivedAt":"2019-05-24T18:49:28Z","isPatch":false,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Fri, May 24, 2019 at 01:48:35PM -0400, Konstantin Ryabitsev wrote:\n> I seem to be getting a segfault trying to verify bundles created from\n> linux.git. It's easy to reproduce:\n> \n> $ cd linux\n> $ git show-ref master\n> c50bbf615f2f0028ad1771506ef8807130ccc2ce refs/heads/master\n> $ git bundle create /tmp/linux.bundle master\n> Enumerating objects: 6705678, done.\n> Counting objects: 100% (6705678/6705678), done.\n> Delta compression using up to 8 threads\n> Compressing objects: 100% (1037089/1037089), done.\n> Writing objects: 100% (6705678/6705678), 1.19 GiB | 97.81 MiB/s, done.\n> Total 6705678 (delta 5657955), reused 6664576 (delta 5622679)\n> $ cd /tmp\n> $ git bundle verify linux.bundle\n> BUG: refs.c:1750: attempting to get main_ref_store outside of repository\n> Aborted (core dumped)\n\n'git bundle verify' needs a repository to check \"that the prerequisite\ncommits exist and are fully linked in the current repository\" (quoting\nits manpage).  I presume your '/tmp' is not a git repository, so Git\ncomplains, though it definitely shouldn't just BUG(), but rather say\n\"fatal: not a git repository (or any of the parent directories): .git\"\ninstead.\n\nHowever, if the bundle is self-contained (like the one you created\nabove), then there are no prerequisite commits to check, and a\nrepository is not strictly necessary to verify the bundle's integrity,\nso 'git bundle verify' could actually get the job done even outside of\na repository.  And it used to work until commit b1ef400eec\n(setup_git_env: avoid blind fall-back to \".git\", 2016-10-20), so I add\nPeff to Cc...\n\n\n"}]}