libgit2
libgit2 copied to clipboard
`git_branch_upstream` could not get the upstream branch in `config.worktree`
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
cf. https://github.com/libgit2/libgit2/issues/6044
Should be fixed via #6756