diff options
| author | Quentin Bernet <quentin.bernet@bluewin.ch> | 2026-03-30 13:24:35 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-30 08:19:40 -0700 |
| commit | 3402850ee16f5a7a05d68cb29271a0e558659aaa (patch) | |
| tree | 020eb3828e8186daca7fb00bdc9878fafbb42069 /builtin | |
| parent | 5361983c075154725be47b65cca9a2421789e410 (diff) | |
| download | git-3402850ee16f5a7a05d68cb29271a0e558659aaa.tar.xz | |
docs: fix "git stash [push]" documentation
Both the synopsis and explanation are incorrect and contradict each
other.
The synopsis claims "push" can only be omitted when you do not give any
options and arguments.
The explanation correctly claims that non-option arguments are not
allowed, except pathspec elements preceded by double hyphens.
But it also adds "-p" to the list of exceptions, even though it is an
option argument.
Signed-off-by: Quentin Bernet <quentin.bernet@bluewin.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
| -rw-r--r-- | builtin/stash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/stash.c b/builtin/stash.c index 95c5005b0b..0d27b2fb1f 100644 --- a/builtin/stash.c +++ b/builtin/stash.c @@ -50,10 +50,10 @@ #define BUILTIN_STASH_STORE_USAGE \ N_("git stash store [(-m | --message) <message>] [-q | --quiet] <commit>") #define BUILTIN_STASH_PUSH_USAGE \ - N_("git stash [push [-p | --patch] [-S | --staged] [-k | --[no-]keep-index] [-q | --quiet]\n" \ + N_("git stash [push] [-p | --patch] [-S | --staged] [-k | --[no-]keep-index] [-q | --quiet]\n" \ " [-u | --include-untracked] [-a | --all] [(-m | --message) <message>]\n" \ " [--pathspec-from-file=<file> [--pathspec-file-nul]]\n" \ - " [--] [<pathspec>...]]") + " [--] [<pathspec>...]") #define BUILTIN_STASH_SAVE_USAGE \ N_("git stash save [-p | --patch] [-S | --staged] [-k | --[no-]keep-index] [-q | --quiet]\n" \ " [-u | --include-untracked] [-a | --all] [<message>]") |
