8000 negative refspec `^refs` not yet implemented · Issue #6741 · libgit2/libgit2 · GitHub
[go: up one dir, main page]

8000
Skip to content
negative refspec ^refs not yet implemented #6741
Closed
@bryango

Description

@bryango

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0