Re: [PATCH v3] push: Enhance unspecified push default warning
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Nov 6, 2013, 21:49 UTC
- Message-ID
- <vpq1u2tb3px.fsf@anie.imag.fr>
- In-Reply-To
- <xmqqk3gl8id0.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
> That is true, but does it justify giving a misleading information in > the advice message?
Clearly, yes. Trying to be exhaustive here is not a good idea, we'd end up rewritting the man page, and then users won't read the message because it's too long.
Show 7 quoted lines
> Specifically: > >>> + "When push.default is set to 'matching', git will push all local branches\n" >>> + "to the remote branches with the same (matching) name. > > invites those who do not read documentation to mistake it with using > an explicit "refs/heads/*:refs/heads/*" refspec.
Yes, but those who want to know the exact behavior should read the doc. That's life.
Show 12 quoted lines
>>> + "In Git 2.0 the new push.default of 'simple' will push only the current\n" >>> + "branch to the same remote branch used by git pull. A push will\n" >>> + "only succeed if the remote and local branches have the same name.\n" > > while you can see that it is not telling a lie if you read it twice, > "will only succeed if" feels somewhat roundabout. > > ... push only the current branch back to the branch of the > same name, but only if 'git pull' is set to pull from that > branch. Otherwise the push will fail. > > might be an improvement, but I dunno.
I do not see much difference actually. I tend to prefer the original version: to me the expected behavior is to make push and pull essentially symetrical, and the fact that it fails if the branch is named differently is a safety feature comming on top of that.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/