Skip to content

bundle verify: improve the user experience when called without a .git/ directory #226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

dscho
Copy link
Member

@dscho dscho commented May 27, 2019

The git bundle verify <bundle> command really needs access to a .git/ directory. But it did not make sure, instead erroring out with a BUG(), making for a terrible user experience.

This patch fixes that.

Changes since v2:

  • Touched up the commit message further, to clarify why it matters that the bundle contains a thin pack.
  • Moved the check from bundle.c to builtin/bundle.c.

Changes since v1:

  • The commit message no longer has an incomplete sentence before a colon, instead the colon was replaced by "that".
  • The title of the test case was corrected.

Cc: Konstantin Ryabitsev [email protected], SZEDER Gábor [email protected], brian m. carlson [email protected], Jeff King [email protected]

@dscho
Copy link
Member Author

dscho commented May 27, 2019

/submit

@gitgitgadget
Copy link

gitgitgadget bot commented May 27, 2019

Submitted as [email protected]

@dscho dscho force-pushed the fix-bundle-verify-segfault branch from f0545e8 to 8467593 Compare May 27, 2019 20:17
@dscho
Copy link
Member Author

dscho commented May 27, 2019

/submit

@gitgitgadget
Copy link

gitgitgadget bot commented May 27, 2019

Submitted as [email protected]

Bundles really are thin packs (i.e. in general, they require an object
database to reconstruct deltified objects), with very little sugar on
top. So we really need a repository (or more appropriately, an object
database) to work with, when asked to verify a bundle.

Let's error out with a useful error message if `git bundle verify` is
called without such an object database to work with.

Reported by Konstantin Ryabitsev.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho force-pushed the fix-bundle-verify-segfault branch from 8467593 to b471c5c Compare May 28, 2019 11:20
@dscho
Copy link
Member Author

dscho commented May 28, 2019

/submit

@gitgitgadget
Copy link

gitgitgadget bot commented May 28, 2019

Submitted as [email protected]

@dscho
Copy link
Member Author

dscho commented Jul 4, 2019

This has been accepted as git/git@3bbbe46

(v1, that is, v2 and v3 did not make it to the list, and I failed to notice this.)

@dscho dscho closed this Jul 4, 2019
@dscho dscho deleted the fix-bundle-verify-segfault branch July 4, 2019 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant