mirror of
https://github.com/git-for-windows/git.git
synced 2026-04-09 15:01:59 -05:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
5361983c07
commit
3402850ee1
@@ -14,10 +14,10 @@ git stash drop [-q | --quiet] [<stash>]
|
||||
git stash pop [--index] [-q | --quiet] [<stash>]
|
||||
git stash apply [--index] [-q | --quiet] [<stash>]
|
||||
git stash branch <branchname> [<stash>]
|
||||
git stash [push [-p | --patch] [-S | --staged] [-k | --[no-]keep-index] [-q | --quiet]
|
||||
git stash [push] [-p | --patch] [-S | --staged] [-k | --[no-]keep-index] [-q | --quiet]
|
||||
[-u | --include-untracked] [-a | --all] [(-m | --message) <message>]
|
||||
[--pathspec-from-file=<file> [--pathspec-file-nul]]
|
||||
[--] [<pathspec>...]]
|
||||
[--] [<pathspec>...]
|
||||
git stash save [-p | --patch] [-S | --staged] [-k | --[no-]keep-index] [-q | --quiet]
|
||||
[-u | --include-untracked] [-a | --all] [<message>]
|
||||
git stash clear
|
||||
@@ -60,10 +60,8 @@ COMMANDS
|
||||
the description along with the stashed state.
|
||||
+
|
||||
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.
|
||||
pathspec elements are only allowed after a double hyphen `--`
|
||||
to prevent a misspelled subcommand from making an unwanted stash entry.
|
||||
|
||||
`save [-p | --patch] [-S | --staged] [-k | --[no-]keep-index] [-u | --include-untracked] [-a | --all] [-q | --quiet] [<message>]`::
|
||||
|
||||
|
||||
@@ -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>]")
|
||||
|
||||
Reference in New Issue
Block a user