Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Branches named different locally than what is tracked as upstream #124

Closed
drKnoxy opened this issue May 8, 2018 · 3 comments
Closed

Branches named different locally than what is tracked as upstream #124

drKnoxy opened this issue May 8, 2018 · 3 comments

Comments

@drKnoxy
Copy link

drKnoxy commented May 8, 2018

When I have push.default set to upstream I think the upstream branch should be opened.

I can put together a PR if you want to offer some guidance in what you are looking for.

@derimagia
Copy link
Collaborator

Sorry for the delay, I agree with you on this. If you're still interested in doing a PR - here's the relevant code:

git-open/git-open

Lines 45 to 50 in 5fefffe

branch_name=$(git name-rev --name-only HEAD 2>/dev/null)
tracked_remote=$(git config "branch.$branch_name.remote")
default_remote=$(git config open.default.remote)
remote=${1:-$default_remote}
remote=${remote:-$tracked_remote}
remote=${remote:-"origin"}

@lovef
Copy link
Contributor

lovef commented May 2, 2019

I believe this relates to the PR I opened: #140, though I disregard push.default and always default to upstream branch as that fits my use case.

@derimagia
Copy link
Collaborator

@lovef fixed this in #140. If you continue to have an issue on master let us know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants