Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Hub doesn't use my default base branch when executing pull-request cmd from worktrees #2484

@csaska

Description

@csaska

Command attempted:

HUB_VERBOSE=1 hub pull-request -p -m "Hub creating a PR to my default branch upstream/core_master"

More info:

$ hub --version
git version 2.21.1
hub version 2.14.1

I've used git remote set-head upstream core_master and git remote set-head origin core_master to set my default branches.

I noticed this issue originally added support for hub creating pull-requests to the defualt base branch when one wasn't specified using the -b flag.

What happened:

When I do hub pull-request from my clone, hub correctly chooses upstream/core_master as my default base branch; however, if I execute the same command in a worktree of this clone, hub defaults to using upstream/master.

From the worktree, I see the following:

{"base":"master","head":"pHWChip:feature/colt_testing","maintainer_can_modify":true,"title":"Testing"}

From the original clone, I see the following:

{"base":"core_master","head":"pHWChip:feature/colt-testing-2","maintainer_can_modify":true,"title":"Testing"}

Question:
Is this intended behavior? Is this a bug? Or am I requesting a new feature here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions