Skip to content

Commit e01db91

Browse files
liambeguingitster
authored andcommitted
stash: update documentation to use 'stash entry'
Most of the time, a 'stash entry' is called a 'stash'. Lets try to make this more consistent and use 'stash entry' instead. Signed-off-by: Liam Beguin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 97e2ff4 commit e01db91

File tree

6 files changed

+40
-38
lines changed

6 files changed

+40
-38
lines changed

Documentation/config.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2620,7 +2620,7 @@ rebase.autoSquash::
26202620
If set to true enable `--autosquash` option by default.
26212621

26222622
rebase.autoStash::
2623-
When set to true, automatically create a temporary stash
2623+
When set to true, automatically create a temporary stash entry
26242624
before the operation begins, and apply it after the operation
26252625
ends. This means that you can run rebase on a dirty worktree.
26262626
However, use with care: the final stash application after a
@@ -3029,12 +3029,12 @@ status.submoduleSummary::
30293029

30303030
stash.showPatch::
30313031
If this is set to true, the `git stash show` command without an
3032-
option will show the stash in patch form. Defaults to false.
3032+
option will show the stash entry in patch form. Defaults to false.
30333033
See description of 'show' command in linkgit:git-stash[1].
30343034

30353035
stash.showStat::
30363036
If this is set to true, the `git stash show` command without an
3037-
option will show diffstat of the stash. Defaults to true.
3037+
option will show diffstat of the stash entry. Defaults to true.
30383038
See description of 'show' command in linkgit:git-stash[1].
30393039

30403040
submodule.<name>.url::

Documentation/git-pull.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ unless you have read linkgit:git-rebase[1] carefully.
131131
--autostash::
132132
--no-autostash::
133133
Before starting rebase, stash local modifications away (see
134-
linkgit:git-stash[1]) if needed, and apply the stash when
134+
linkgit:git-stash[1]) if needed, and apply the stash entry when
135135
done. `--no-autostash` is useful to override the `rebase.autoStash`
136136
configuration variable (see linkgit:git-config[1]).
137137
+

Documentation/git-rebase.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ used to override and disable this setting.
446446

447447
--autostash::
448448
--no-autostash::
449-
Automatically create a temporary stash before the operation
449+
Automatically create a temporary stash entry before the operation
450450
begins, and apply it after the operation ends. This means
451451
that you can run rebase on a dirty worktree. However, use
452452
with care: the final stash application after a successful

Documentation/git-stash.txt

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,18 @@ OPTIONS
5151
save [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all] [-q|--quiet] [<message>]::
5252
push [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all] [-q|--quiet] [-m|--message <message>] [--] [<pathspec>...]::
5353

54-
Save your local modifications to a new 'stash' and roll them
54+
Save your local modifications to a new 'stash entry' and roll them
5555
back to HEAD (in the working tree and in the index).
5656
The <message> part is optional and gives
5757
the description along with the stashed state.
5858
+
5959
For quickly making a snapshot, you can omit "push". In this mode,
6060
non-option arguments are not allowed to prevent a misspelled
61-
subcommand from making an unwanted stash. The two exceptions to this
61+
subcommand from making an unwanted stash entry. The two exceptions to this
6262
are `stash -p` which acts as alias for `stash push -p` and pathspecs,
6363
which are allowed after a double hyphen `--` for disambiguation.
6464
+
65-
When pathspec is given to 'git stash push', the new stash records the
65+
When pathspec is given to 'git stash push', the new stash entry records the
6666
modified states only for the files that match the pathspec. The index
6767
entries and working tree files are then rolled back to the state in
6868
HEAD only for these files, too, leaving files that do not match the
@@ -89,10 +89,10 @@ The `--patch` option implies `--keep-index`. You can use
8989

9090
list [<options>]::
9191

92-
List the stashes that you currently have. Each 'stash' is listed
93-
with its name (e.g. `stash@{0}` is the latest stash, `stash@{1}` is
92+
List the stash entries that you currently have. Each 'stash entry' is
93+
listed with its name (e.g. `stash@{0}` is the latest entry, `stash@{1}` is
9494
the one before, etc.), the name of the branch that was current when the
95-
stash was made, and a short description of the commit the stash was
95+
entry was made, and a short description of the commit the entry was
9696
based on.
9797
+
9898
----------------------------------------------------------------
@@ -105,11 +105,12 @@ command to control what is shown and how. See linkgit:git-log[1].
105105

106106
show [<stash>]::
107107

108-
Show the changes recorded in the stash as a diff between the
109-
stashed state and its original parent. When no `<stash>` is given,
110-
shows the latest one. By default, the command shows the diffstat, but
111-
it will accept any format known to 'git diff' (e.g., `git stash show
112-
-p stash@{1}` to view the second most recent stash in patch form).
108+
Show the changes recorded in the stash entry as a diff between the
109+
stashed contents and the commit back when the stash entry was first
110+
created. When no `<stash>` is given, it shows the latest one.
111+
By default, the command shows the diffstat, but it will accept any
112+
format known to 'git diff' (e.g., `git stash show -p stash@{1}`
113+
to view the second most recent entry in patch form).
113114
You can use stash.showStat and/or stash.showPatch config variables
114115
to change the default behavior.
115116

@@ -149,26 +150,27 @@ branch <branchname> [<stash>]::
149150
+
150151
This is useful if the branch on which you ran `git stash save` has
151152
changed enough that `git stash apply` fails due to conflicts. Since
152-
the stash is applied on top of the commit that was HEAD at the time
153-
`git stash` was run, it restores the originally stashed state with
154-
no conflicts.
153+
the stash entry is applied on top of the commit that was HEAD at the
154+
time `git stash` was run, it restores the originally stashed state
155+
with no conflicts.
155156

156157
clear::
157-
Remove all the stashed states. Note that those states will then
158+
Remove all the stash entries. Note that those entries will then
158159
be subject to pruning, and may be impossible to recover (see
159160
'Examples' below for a possible strategy).
160161

161162
drop [-q|--quiet] [<stash>]::
162163

163-
Remove a single stashed state from the stash list. When no `<stash>`
164-
is given, it removes the latest one. i.e. `stash@{0}`, otherwise
165-
`<stash>` must be a valid stash log reference of the form
166-
`stash@{<revision>}`.
164+
Remove a single stash entry from the list of stash entries.
165+
When no `<stash>` is given, it removes the latest one.
166+
i.e. `stash@{0}`, otherwise `<stash>` must be a valid stash
167+
log reference of the form `stash@{<revision>}`.
167168

168169
create::
169170

170-
Create a stash (which is a regular commit object) and return its
171-
object name, without storing it anywhere in the ref namespace.
171+
Create a stash entry (which is a regular commit object) and
172+
return its object name, without storing it anywhere in the ref
173+
namespace.
172174
This is intended to be useful for scripts. It is probably not
173175
the command you want to use; see "save" above.
174176

@@ -182,10 +184,10 @@ store::
182184
DISCUSSION
183185
----------
184186

185-
A stash is represented as a commit whose tree records the state of the
186-
working directory, and its first parent is the commit at `HEAD` when
187-
the stash was created. The tree of the second parent records the
188-
state of the index when the stash is made, and it is made a child of
187+
A stash entry is represented as a commit whose tree records the state
188+
of the working directory, and its first parent is the commit at `HEAD`
189+
when the entry was created. The tree of the second parent records the
190+
state of the index when the entry is made, and it is made a child of
189191
the `HEAD` commit. The ancestry graph looks like this:
190192

191193
.----W
@@ -269,12 +271,12 @@ $ edit/build/test remaining parts
269271
$ git commit foo -m 'Remaining parts'
270272
----------------------------------------------------------------
271273

272-
Recovering stashes that were cleared/dropped erroneously::
274+
Recovering stash entries that were cleared/dropped erroneously::
273275

274-
If you mistakenly drop or clear stashes, they cannot be recovered
276+
If you mistakenly drop or clear stash entries, they cannot be recovered
275277
through the normal safety mechanisms. However, you can try the
276-
following incantation to get a list of stashes that are still in your
277-
repository, but not reachable any more:
278+
following incantation to get a list of stash entries that are still in
279+
your repository, but not reachable any more:
278280
+
279281
----------------------------------------------------------------
280282
git fsck --unreachable |

Documentation/gitcli.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ different things.
194194
* The `--index` option is used to ask a command that
195195
usually works on files in the working tree to *also*
196196
affect the index. For example, `git stash apply` usually
197-
merges changes recorded in a stash to the working tree,
197+
merges changes recorded in a stash entry to the working tree,
198198
but with the `--index` option, it also merges changes to
199199
the index as well.
200200

git-stash.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ parse_flags_and_rev()
481481

482482
case $# in
483483
0)
484-
have_stash || die "$(gettext "No stash found.")"
484+
have_stash || die "$(gettext "No stash entries found.")"
485485
set -- ${ref_stash}@{0}
486486
;;
487487
1)
@@ -573,7 +573,7 @@ apply_stash () {
573573
GIT_INDEX_FILE="$TMPindex" git-read-tree "$u_tree" &&
574574
GIT_INDEX_FILE="$TMPindex" git checkout-index --all &&
575575
rm -f "$TMPindex" ||
576-
die "$(gettext "Could not restore untracked files from stash")"
576+
die "$(gettext "Could not restore untracked files from stash entry")"
577577
fi
578578

579579
eval "
@@ -627,7 +627,7 @@ pop_stash() {
627627
drop_stash "$@"
628628
else
629629
status=$?
630-
say "$(gettext "The stash is kept in case you need it again.")"
630+
say "$(gettext "The stash entry is kept in case you need it again.")"
631631
exit $status
632632
fi
633633
}

0 commit comments

Comments
 (0)