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

negative refspec ^refs not yet implemented #6741

Open
bryango opened this issue Feb 18, 2024 · 0 comments
Open

negative refspec ^refs not yet implemented #6741

bryango opened this issue Feb 18, 2024 · 0 comments

Comments

@bryango
Copy link

bryango commented Feb 18, 2024

It seems that negative refspec in the form of ^refs is not yet implemented in libgit2. See:

Reproduction steps

Perform a fetch with a negative refspec in some application. I am using https://github.com/arxanas/git-branchless/tree/v0.8.0.
Observe the error:

$ git-branchless submit @
branchless: running command: git fetch origin refs/heads/checkpoint-build-improve
Pseudo-terminal will not be allocated because stdin is not a terminal.
From github.com:bryango/nixpkgs
 * branch                      checkpoint-build-improve -> FETCH_HEAD
The application panicked (crashed).
Message:  A fatal error occurred: 
   0: could not find upstream branch for branch with name 'checkpoint-build-improve': '^refs/heads/rapidfuzz-opt-numpy' is not a valid refspec.; class=Invalid (3)
   1: '^refs/heads/rapidfuzz-opt-numpy' is not a valid refspec.; class=Invalid (3)

Location: git-branchless-submit/src/branch_forge.rs:155
Location: git-branchless/src/commands/mod.rs:235

The full error is specific to git-branchless, but the not a valid refspec part seems to come from libgit2.

Expected behavior

Understand negative refspec in the form of ^refs.

Actual behavior

Do not understand negative refspec in the form of ^refs.

Version of libgit2 (release number or SHA1)

libgit2-sys 0.15.2+1.6.4

I believe this is the rust binding of libgit2 v1.6.4.

Operating system(s) tested

$ uname -a
Linux 6.6.8-2-MANJARO #1 SMP PREEMPT_DYNAMIC Thu Dec 21 16:21:45 UTC 2023 x86_64 GNU/Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants