Re: [PATCH] push: Provide situational hints for non-fast-forward errors
From: Christopher Tiwald <hidden>
Date: 2016-06-15 22:53:18
On Wed, Mar 14, 2012 at 10:06:52AM +0100, Matthieu Moy wrote:
Depending on the outcome of the discussion in the thread about 'push.default', you may want to suggest 'current' instead of upstream: http://thread.gmane.org/gmane.comp.version-control.git/192547/focus=192694 Actually, if the user has 'push.default=matching', the least surprising move from this value is 'push.default=current', that will push a subset of what used to be pushed, and won't change the target branch.
My only concern about 'push.default=current' vs. 'upstream' is the case where a developer might push to a central shared repository, but has a local branch tracking a remote branch with a different name. That might be too deep in the edge-case weeds, but it seems like for 'centralized' git users, 'upstream' covers more cases without any distraction to their workflows.
Your patch removes the _(...) around the string, which breaks the internationalization. ...quoted
+ for (i = 0; i < ARRAY_SIZE(message_advice_pull_before_push); i++) + advise(message_advice_pull_before_push[i]);I'm no expert in gettext, but I think the internationalization people will have a hard time dealing with a single message split accross an array. Actually, I prefer the effect of a single advise() call (i.e. say "hint:" just once, not for each line), but this part is subjective.
The lack of support for internationalization is an oversight. I'll correct it in v2.
I'd give the full cut-and-paste ready command to set the variable, to help the user who doesn't know what "configuration variable" really means in the context of Git.
Makes a lot of sense. I remember struggling with setting config variables when I was new to git. I'll make that change. -- Christopher Tiwald