Re: [PATCH 4/7] push: introduce new push.default mode "simple"
From: Matthieu Moy <hidden>
Date: 2016-06-15 22:53:38
Michael Haggerty [off-list ref] writes:
I like your conservative approach to this decision.
Conservativeness is not the only argument. I originally thought we
should follow 'current' when no upstream is configured, but I changed my
mind noticing that the error message suggests "git push --set-upstream".
The question is, if the user has no upstream configured, whether we
should let him continue without configuring it, or whether it's better
to encourage him to set the upstream.
I can see senarios where people would want to push to current, and merge
from @{upstream} (e.g. push = publish, pull = get changes from another
developer). But I think most if not all senarios would benefit from
having the upstream configured (even if you never pull, the ability to
run "git log ^@{upstream}", or argumentless "git rebase -i" and the
hints in "git status" telling you how many unpushed revisions you have
are nice).
Now, I agree that "denying the push with an advice" is a bit too strong
when the goal is "encourraging to set upstream", so that's why I think
it's debatable.
But what do people think about letting push succeed when no upstream is configured *provided that* there is already a branch on the remote server with the same name as the current branch? I think this policy would cover the bulk of "safe" scenarios without adding dangerous/ambiguous ones.
No strong opinion. My arguments above argue in favor of rejecting this, but I'd be fine with that. -- Matthieu Moy http://www-verimag.imag.fr/~moy/