summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-03-22 21:00:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-03-22 21:00:24 (GMT)
commitf5c73f69fd711f4814a2e8da78a0a2f4dbb46013 (patch)
tree8189b949645acae74d33f5b3210928b0bb8d58f0 /Documentation
parentdd4048d1c76f067ad7b339dfb3a5f4765f5ae979 (diff)
parent0af760e26191acd3c5957841461ff224b80b43f7 (diff)
downloadgit-f5c73f69fd711f4814a2e8da78a0a2f4dbb46013.zip
git-f5c73f69fd711f4814a2e8da78a0a2f4dbb46013.tar.gz
git-f5c73f69fd711f4814a2e8da78a0a2f4dbb46013.tar.bz2
Merge branch 'dl/stash-show-untracked'
"git stash show" learned to optionally show untracked part of the stash. * dl/stash-show-untracked: stash show: learn stash.showIncludeUntracked stash show: teach --include-untracked and --only-untracked
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/config/stash.txt5
-rw-r--r--Documentation/git-stash.txt22
2 files changed, 20 insertions, 7 deletions
diff --git a/Documentation/config/stash.txt b/Documentation/config/stash.txt
index 00eb354..413f907 100644
--- a/Documentation/config/stash.txt
+++ b/Documentation/config/stash.txt
@@ -5,6 +5,11 @@ stash.useBuiltin::
is always used. Setting this will emit a warning, to alert any
remaining users that setting this now does nothing.
+stash.showIncludeUntracked::
+ If this is set to true, the `git stash show` command without an
+ option will show the untracked files of a stash entry. Defaults to
+ false. See description of 'show' command in linkgit:git-stash[1].
+
stash.showPatch::
If this is set to true, the `git stash show` command without an
option will show the stash entry in patch form. Defaults to false.
diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt
index f1197d6..a8c8c32 100644
--- a/Documentation/git-stash.txt
+++ b/Documentation/git-stash.txt
@@ -9,7 +9,7 @@ SYNOPSIS
--------
[verse]
'git stash' list [<log-options>]
-'git stash' show [<diff-options>] [<stash>]
+'git stash' show [-u|--include-untracked|--only-untracked] [<diff-options>] [<stash>]
'git stash' drop [-q|--quiet] [<stash>]
'git stash' ( pop | apply ) [--index] [-q|--quiet] [<stash>]
'git stash' branch <branchname> [<stash>]
@@ -83,7 +83,7 @@ stash@{1}: On master: 9cc0589... Add git-stash
The command takes options applicable to the 'git log'
command to control what is shown and how. See linkgit:git-log[1].
-show [<diff-options>] [<stash>]::
+show [-u|--include-untracked|--only-untracked] [<diff-options>] [<stash>]::
Show the changes recorded in the stash entry as a diff between the
stashed contents and the commit back when the stash entry was first
@@ -91,8 +91,8 @@ show [<diff-options>] [<stash>]::
By default, the command shows the diffstat, but it will accept any
format known to 'git diff' (e.g., `git stash show -p stash@{1}`
to view the second most recent entry in patch form).
- You can use stash.showStat and/or stash.showPatch config variables
- to change the default behavior.
+ You can use stash.showIncludeUntracked, stash.showStat, and
+ stash.showPatch config variables to change the default behavior.
pop [--index] [-q|--quiet] [<stash>]::
@@ -160,10 +160,18 @@ up with `git clean`.
-u::
--include-untracked::
- This option is only valid for `push` and `save` commands.
+--no-include-untracked::
+ When used with the `push` and `save` commands,
+ all untracked files are also stashed and then cleaned up with
+ `git clean`.
++
+When used with the `show` command, show the untracked files in the stash
+entry as part of the diff.
+
+--only-untracked::
+ This option is only valid for the `show` command.
+
-All untracked files are also stashed and then cleaned up with
-`git clean`.
+Show only the untracked files in the stash entry as part of the diff.
--index::
This option is only valid for `pop` and `apply` commands.