libgit2 icon indicating copy to clipboard operation
libgit2 copied to clipboard

`git_branch_upstream` could not get the upstream branch in `config.worktree`

Open Whirlwind opened this issue 2 years ago • 1 comments

Reproduction steps

$ git clone --filter=blob:none git@xxx:xx/xx.git
$ cd xx
$ git worktree add ../worktree
$ cd ../worktree
$ git config extensions.worktreeConfig true
$ git checkout new-branch
$ git push -u

Then, use the git_branch_upstream will could not get the origin/new-branch, it said GIT_ENOTFOUND.

Expected behavior

git_branch_upstream can get the upstream branch in the config.worktree.

Actual behavior

throw error.

Version of libgit2 (release number or SHA1)

1.6.4

Operating system(s) tested

macOS 14.1

Whirlwind avatar Oct 30 '23 13:10 Whirlwind

cf. https://github.com/libgit2/libgit2/issues/6044

csware avatar Feb 24 '24 12:02 csware

Should be fixed via #6756

ethomson avatar May 03 '24 08:05 ethomson