From: Ben Knoble <ben.knoble@gmail•com>
To: Mirko Faina <mroik@delayed•space>
Cc: Quentin Bernet via GitGitGadget <gitgitgadget@gmail•com>,
git@vger•kernel.org, Quentin Bernet <quentin.bernet@bluewin•ch>,
Mirko Faina <mroik@delayed•space>
Subject: Re: [PATCH] docs: fix git stash grammar
Date: Fri, 27 Mar 2026 12:47:48 -0400 [thread overview]
Message-ID: <4B4B5BCF-BC0C-42A1-A6F1-52FF96EF0BFC@gmail.com> (raw)
In-Reply-To: <acXIl2cuBv0ifiK6@exploit>
>
> Le 26 mars 2026 à 20:04, Mirko Faina <mroik@delayed•space> a écrit :
>
> On Thu, Mar 26, 2026 at 12:17:46PM -0400, D. Ben Knoble wrote:
>> Now, _is_ the grammar bracketed wrong? "git help stash" says
>>
>> For quickly making a snapshot, you can omit "push". In this mode,
>> non-option arguments are not allowed to prevent a misspelled
>> subcommand from making an unwanted stash entry. The two exceptions
>> to this are stash -p which acts as alias for stash push -p and
>> pathspec elements, which are allowed after a double hyphen -- for
>> disambiguation.
>>
>> So _if_ you want to provide options (other than "-p"), the "push" is
>> required. I think the existing brackets indicate that.
>
> When it says "In this mode, non-option arguments are not allowed"
> wouldn't -m be allowed as it is an option and not a non-option? In fact
> if we do try to run "git stash -m something" it does correctly stash
> while if we do something like "git stash pathspec" it does give back
> "fatal: subcommand wasn't specified; 'push' can't be assumed due to
> unexpected token 'pathspec'".
>
> If that is the case then there is an issue with the way the usage
> tooltip shows the optionality of "push".
Indeed, thanks.
next prev parent reply other threads:[~2026-03-27 16:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 12:45 [PATCH] docs: fix git stash grammar Quentin Bernet via GitGitGadget
2026-03-26 16:17 ` D. Ben Knoble
2026-03-27 0:04 ` Mirko Faina
2026-03-27 15:58 ` Junio C Hamano
2026-03-27 16:28 ` Quentin Bernet
2026-03-27 16:53 ` Junio C Hamano
2026-03-27 16:58 ` Quentin Bernet
2026-03-27 17:16 ` Junio C Hamano
2026-03-27 17:36 ` Quentin Bernet
2026-03-27 17:45 ` Junio C Hamano
2026-03-27 16:47 ` Ben Knoble [this message]
2026-03-27 8:25 ` Quentin Bernet
2026-03-30 13:24 ` [PATCH v2] docs: fix "git stash [push]" documentation Quentin Bernet via GitGitGadget
2026-03-30 15:18 ` Junio C Hamano
2026-03-30 17:19 ` Quentin Bernet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B4B5BCF-BC0C-42A1-A6F1-52FF96EF0BFC@gmail.com \
--to=ben.knoble@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitgitgadget@gmail$(echo .)com \
--cc=mroik@delayed$(echo .)space \
--cc=quentin.bernet@bluewin$(echo .)ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox