You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unsupported extension name extensions.worktreeconfig #278
Running git sparse-checkout set will cause all git-branchless commands to fail with Git error GenericError: unsupported extension name extensions.worktreeconfig in that repo.
cd /tmp
git init testcdtest
git commit --allow-empty -m 'Initial commit'
git sparse-checkout set
git branchless smartlog
Expected behavior
The smart log should show successfully, e.g.
◆ b1350a3f 12s (master) Initial commit
Actual behavior
The application panicked (crashed).
Message: A fatal error occurred:
0: Git error GenericError: unsupported extension name extensions.worktreeconfig
Location:
src/git/repo.rs:45
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SPANTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
0: branchless::git::repo::from_dir with path="/private/tmp/test"
at src/git/repo.rs:193
1: branchless::commands::smartlog::smartlog with effects=<Output fancy=true> git_run_info=<GitRunInfo path_to_git="git" working_directory="/private/tmp/test" env=not shown> options=SmartlogOptions { show_hidden_commits: false }
at src/commands/smartlog.rs:526
Thanks for reporting. git-branchless should work fine with sparse checkouts (I use them at work), so most likely the only issue is with the extension.worktreeConfig setting. (If not, please update repro steps.) I'm guessing that we would need to make an upstream libgit2 change and percolate it down to git2 and then git-branchless.
The obvious workaround would be to disable extension.worktreeConfig, if that's possible for you. Unless this comes up at work, I don't have any plans to work on the upstream change, but if it ends up being done, I can fork the necessary crates and pull them into git-branchless before they're officially released.
I was able to reproduce this in Git v2.35.0. However, it looks like this behavior, at least for the repro case, stops happening in Git v2.36.0 thanks to this commit: git/git@7316dc5. If upgrading Git is an option for you, you should try it to see if it solves your problem.
Ah interesting. Unfortunately the repo I work on already has core.repositoryformatversion set to 1, and I presume downgrading that is unsafe. (I don't want to clone this repo again.)
Activity
auscompgeek commentedon Feb 21, 2022
I presume this is related to
git config extensions.worktreeConfigbut I had trouble simplifying the STR further. Notably from those docs:I'm guessing libgit2 doesn't handle this extension?
martinvonz commentedon Feb 21, 2022
Yes, I think this is libgit2/libgit2#6044. I suspect the fix is pretty simple, as someone there commented.
[-]`git sparse-checkout set` breaks git-branchless[/-][+]Unsupported extension name extensions.worktreeconfig[/+]arxanas commentedon Feb 21, 2022
Thanks for reporting. git-branchless should work fine with sparse checkouts (I use them at work), so most likely the only issue is with the
extension.worktreeConfigsetting. (If not, please update repro steps.) I'm guessing that we would need to make an upstreamlibgit2change and percolate it down togit2and thengit-branchless.The obvious workaround would be to disable
extension.worktreeConfig, if that's possible for you. Unless this comes up at work, I don't have any plans to work on the upstream change, but if it ends up being done, I can fork the necessary crates and pull them intogit-branchlessbefore they're officially released.arxanas commentedon Sep 14, 2022
I was able to reproduce this in Git v2.35.0. However, it looks like this behavior, at least for the repro case, stops happening in Git v2.36.0 thanks to this commit: git/git@7316dc5. If upgrading Git is an option for you, you should try it to see if it solves your problem.
auscompgeek commentedon Sep 14, 2022
Ah interesting. Unfortunately the repo I work on already has
core.repositoryformatversionset to 1, and I presume downgrading that is unsafe. (I don't want to clone this repo again.)arxanas commentedon Sep 14, 2022
@auscompgeek you can also consider doing a shallow clone of the repo locally to get a "fresh" copy while hopefully not taking too long.