Skip to content
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

a repository with sparse-checkout fails #192

Open
rbuckland opened this issue Feb 21, 2024 · 2 comments
Open

a repository with sparse-checkout fails #192

rbuckland opened this issue Feb 21, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@rbuckland
Copy link

Describe the bug
Underlying library libgit2 does not support repositories that use sparse-checkout
(ref: libgit2/libgit2#6044)

This is for libgit2 to resolve, however, there seems to be a "protective" approach that convco needs to do, until libgit2 resolved the issue.

(gfold had to do the same - JohnFredok/gfold@667d927)

To Reproduce
Steps to reproduce the behavior:
❯ convco version
7.0.0

❯ git sparse-checkout init --cone

❯ convco version
unsupported extension name extensions.worktreeconfig; class=Repository (6)
unsupported extension name extensions.worktreeconfig; class=Repository (6)

Expected behavior
No error, and if possible (depending on paths) still print the version
or, send error to stderr, and not fail.

Recovery from
❯ git sparse-checkout disable
and remove the added extenstion entry. Even if the value is "false" it will still error.

[extensions]
        worktreeConfig = true
".git/config" 277L, 9695B  
@rbuckland rbuckland added the bug Something isn't working label Feb 21, 2024
@hdevalke
Copy link
Collaborator

If there is an error opening the repo, I don't understand why the exit code should be 0.

In gfold, the workaround returns from the function, but does not have a repo instance. So if the same workaround is done, it will not be possible to calculate the version.

So I think what convco does now is the right thing

@rbuckland
Copy link
Author

convco does the right thing yes, however, the underlying issue in libgit2 means that convco cannot be used on repositories that use worktreeconfig git extensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants