-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
sync
subcommand with --pull
does not support negative refspecs
#1444
Comments
sync
subcommand does not support negative refspecssync
subcommand with --pull
does not support negative refspecs
Seems like this is an upstream issue: libgit2/libgit2#6741 |
Thanks for reporting. It's unfortunate because, as far as I know, we don't actually need or care about the git-branchless/git-branchless-lib/src/git/reference.rs Lines 277 to 296 in 2be0fd0
And then I guess we're making a I only glanced through it, but it's possible that we only need the OID of upstream branch, and not the full branch information. Namely, we might be able to call this function instead: git-branchless/git-branchless-lib/src/git/reference.rs Lines 298 to 308 in 2be0fd0
where we're doing this in git-branchless/git-branchless/src/commands/sync.rs Lines 170 to 183 in 2be0fd0
and then maybe we would avoid hitting the unimplemented libgit2 code path? If you're interested, you could try it to see if it fixes your error. |
Thanks for all the code pointers! Will give it a shot when I get some free time (hopefully in the next week) |
Description of the bug
Git v2.29.0 supports negative refspecs to allow filtering which refspecs to ignore.
It seems like
git branchless sync --pull
does not currently respect this and will cause panics if a negative refspec is specified in the git config.Example git config specifying a negative refspec for any branches with an underscore prefix
Expected behavior
When running
git branchless sync --pull
, I expect all refs to be fetched from the remote following all git refspec rules (i.e. all refs which match postive refspecs and do not match any negative refspecs), and all local refs to be updated.Actual behavior
A panic:
Version of
rustc
No response
Automated bug report
No response
Version of
git-branchless
git-branchless-opts 0.10.0
Version of
git
git version 2.44.0
The text was updated successfully, but these errors were encountered: