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

Improve push target detection for push.default=upstream #2190

Merged
merged 1 commit into from
Jul 9, 2019

Conversation

mislav
Copy link
Owner

@mislav mislav commented Jul 9, 2019

When git config push.default is "upstream" or "tracking", but the current branch is pushed to a remote without having upstream configuration set up (for example, via git push <REMOTE> HEAD without -u), this change makes it so that the remote tracking branch (the push target) is still discovered via the same mechanism as if push.default wasn't set (i.e. iterating through all the remotes).

Fixes #189 (comment) /cc @lestephane

When `git config push.default` is "upstream" or "tracking", but the
current branch is pushed to a remote without having upstream
configuration set up (for example, via `git push <REMOTE> HEAD` without
`-u`), this change makes it so that the remote tracking branch (the push
target) is still discovered via the same mechanism as if `push.default`
wasn't set (i.e. iterating through all the remotes).
@mislav mislav merged commit 2c940a8 into master Jul 9, 2019
@mislav mislav deleted the upstream-no-tracking branch July 9, 2019 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error creating pull request: Unprocessable Entity (HTTP 422)
1 participant