Re: [PATCH 4/7] push: introduce new push.default mode "simple"
- From
Michael Haggerty <mhagger@alum.mit.edu>
- Date
- Apr 23, 2012, 10:32 UTC
- Message-ID
- <4F952FD9.90806@alum.mit.edu>
- In-Reply-To
- <1335170284-30768-5-git-send-email-Matthieu.Moy@imag.fr>
On 04/23/2012 10:38 AM, Matthieu Moy wrote:
Show 8 quoted lines
> [...] > A question is whether to allow pushing when no upstream is configured. An > argument in favor of allowing the push is that it makes the new mode work > in more cases. On the other hand, refusing to push when no upstream is > configured encourages the user to set the upstream, which will be > beneficial on the next pull. Lacking better argument, we chose to deny > the push, because it will be easier to change in the future if someone > shows us wrong.
I like your conservative approach to this decision. I agree that a push that would create a new branch on the remote server should fail if no upstream is configured.
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.
Michael
-- Michael Haggerty mhagger@alum.mit.edu http://softwareswirl.blogspot.com/