Skip to content

git_branch_upstream could not get the upstream branch in config.worktree #6650

Closed
@Whirlwind

Description

@Whirlwind

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions