On 10/21, Jeff King wrote:
> On Thu, Oct 19, 2017 at 07:33:03PM +0100, Thomas Gummerer wrote:
> 
> > diff --git a/git-stash.sh b/git-stash.sh
> > index 8b2ce9afda..16919277ba 100755
> > --- a/git-stash.sh
> > +++ b/git-stash.sh
> > @@ -267,11 +267,11 @@ push_stash () {
> >                     # translation of "error: " takes in your language. E.g. 
> > in
> >                     # English this is:
> >                     #
> > -                   #    $ git stash save --blah-blah 2>&1 | head -n 2
> > -                   #    error: unknown option for 'stash save': --blah-blah
> > -                   #           To provide a message, use git stash save -- 
> > '--blah-blah'
> > -                   eval_gettextln "error: unknown option for 'stash save': 
> > \$option
> > -       To provide a message, use git stash save -- '\$option'"
> > +                   #    $ git stash push --blah-blah 2>&1 | head -n 2
> > +                   #    error: unknown option for 'stash push': --blah-blah
> > +                   #           To provide a message, use git stash push -- 
> > '--blah-blah'
> > +                   eval_gettextln "error: unknown option for 'stash push': 
> > \$option
> > +       To provide a message, use git stash push -m '\$option'"
> 
> The user message is fixed here, but doesn't the message for translators
> need the same treatment?  I guess it's just talking about the spacing,
> so it doesn't need to be completely accurate. But it probably makes
> sense to update it at the same time.

Yeah, I was completely blind here, that should definitely have been
updated as well.  Thanks for catching.

> As an aside, I do kind of wonder if the right advice for "push" is
> different than for "save" here. I.e., should it say "to provide a
> pathspec that starts with --, use push -- --blah-blah". I'm not sure it
> matters that much. Second-guessing what a user meant seems likely to go
> wrong (e.g., "--icnlude-untracked" would trigger this message, which is
> just silly). But that's largely orthogonal to what you're doing here.

The best advice for it might indeed be different for "save" and
"push".  The slight weirdness we have here is that both "save" and
"push" are using the same option parsing.

Now that we're deprecating "save", I don't think it's worth the effort
to try to get rid of this weirdness.

I think using "--" to distinguish the the pathspec from the command
line options is a common enough pattern that we don't need to give
advice to the users.  I feel like that second line was mostly there
because of the weirdness in the user interface for "stash save".
Maybe we should just get rid of that part alltogether?

> -Peff

Reply via email to