Re: [PATCH v2 1/2] replace git stash save with git stash push in the documentation
- From
Jeff King <peff@peff.net>
- Date
- Oct 21, 2017, 06:26 UTC
- Message-ID
- <20171021062617.yajqusruqanjnicb@sigill.intra.peff.net>
- In-Reply-To
- <20171019183304.26748-1-t.gummerer@gmail.com>
On Thu, Oct 19, 2017 at 07:33:03PM +0100, Thomas Gummerer wrote:
Show 18 quoted lines
> 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.
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.
-Peff