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 <liambeguin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Liam Beguin committed Jun 17, 2017 at 18:30 UTC e01db917d8e5c66f9f90bf8c44995cf47200273a
6 files changed +40 -38
Documentation/config.txt
+3 -3
@@ -2620,7 +2620,7 @@ rebase.autoSquash::
2620 If set to true enable `--autosquash` option by default.
2621
2622 rebase.autoStash::
2623 - When set to true, automatically create a temporary stash
2623 + When set to true, automatically create a temporary stash entry
2624 before the operation begins, and apply it after the operation
2625 ends. This means that you can run rebase on a dirty worktree.
2626 However, use with care: the final stash application after a
@@ -3029,12 +3029,12 @@ status.submoduleSummary::
3029
3030 stash.showPatch::
3031 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.
3033 See description of 'show' command in linkgit:git-stash[1].
3034
3035 stash.showStat::
3036 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.
3038 See description of 'show' command in linkgit:git-stash[1].
3039
3040 submodule.<name>.url::
Documentation/git-pull.txt
+1 -1
@@ -131,7 +131,7 @@ unless you have read linkgit:git-rebase[1] carefully.
131 --autostash::
132 --no-autostash::
133 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
135 done. `--no-autostash` is useful to override the `rebase.autoStash`
136 configuration variable (see linkgit:git-config[1]).
137 +
Documentation/git-rebase.txt
+1 -1
@@ -446,7 +446,7 @@ used to override and disable this setting.
446
447 --autostash::
448 --no-autostash::
449 - Automatically create a temporary stash before the operation
449 + Automatically create a temporary stash entry before the operation
450 begins, and apply it after the operation ends. This means
451 that you can run rebase on a dirty worktree. However, use
452 with care: the final stash application after a successful
Documentation/git-stash.txt
+31 -29
@@ -51,18 +51,18 @@ OPTIONS
51 save [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all] [-q|--quiet] [<message>]::
52 push [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all] [-q|--quiet] [-m|--message <message>] [--] [<pathspec>...]::
53
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
55 back to HEAD (in the working tree and in the index).
56 The <message> part is optional and gives
57 the description along with the stashed state.
58 +
59 For quickly making a snapshot, you can omit "push". In this mode,
60 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
62 are `stash -p` which acts as alias for `stash push -p` and pathspecs,
63 which are allowed after a double hyphen `--` for disambiguation.
64 +
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
66 modified states only for the files that match the pathspec. The index
67 entries and working tree files are then rolled back to the state in
68 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
89
90 list [<options>]::
91
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
94 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
96 based on.
97 +
98 ----------------------------------------------------------------
@@ -105,11 +105,12 @@ command to control what is shown and how. See linkgit:git-log[1].
105
106 show [<stash>]::
107
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).
114 You can use stash.showStat and/or stash.showPatch config variables
115 to change the default behavior.
116
@@ -149,26 +150,27 @@ branch <branchname> [<stash>]::
150 +
151 This is useful if the branch on which you ran `git stash save` has
152 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.
156
157 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
159 be subject to pruning, and may be impossible to recover (see
160 'Examples' below for a possible strategy).
161
162 drop [-q|--quiet] [<stash>]::
163
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>}`.
168
169 create::
170
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.
174 This is intended to be useful for scripts. It is probably not
175 the command you want to use; see "save" above.
176
@@ -182,10 +184,10 @@ store::
184 DISCUSSION
185 ----------
186
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
191 the `HEAD` commit. The ancestry graph looks like this:
192
193 .----W
@@ -269,12 +271,12 @@ $ edit/build/test remaining parts
271 $ git commit foo -m 'Remaining parts'
272 ----------------------------------------------------------------
273
272 -Recovering stashes that were cleared/dropped erroneously::
274 +Recovering stash entries that were cleared/dropped erroneously::
275
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
277 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:
280 +
281 ----------------------------------------------------------------
282 git fsck --unreachable |
Documentation/gitcli.txt
+1 -1
@@ -194,7 +194,7 @@ different things.
194 * The `--index` option is used to ask a command that
195 usually works on files in the working tree to *also*
196 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,
198 but with the `--index` option, it also merges changes to
199 the index as well.
200
git-stash.sh
+3 -3
@@ -481,7 +481,7 @@ parse_flags_and_rev()
481
482 case $# in
483 0)
484 - have_stash || die "$(gettext "No stash found.")"
484 + have_stash || die "$(gettext "No stash entries found.")"
485 set -- ${ref_stash}@{0}
486 ;;
487 1)
@@ -573,7 +573,7 @@ apply_stash () {
573 GIT_INDEX_FILE="$TMPindex" git-read-tree "$u_tree" &&
574 GIT_INDEX_FILE="$TMPindex" git checkout-index --all &&
575 rm -f "$TMPindex" ||
576 - die "$(gettext "Could not restore untracked files from stash")"
576 + die "$(gettext "Could not restore untracked files from stash entry")"
577 fi
578
579 eval "
@@ -627,7 +627,7 @@ pop_stash() {
627 drop_stash "$@"
628 else
629 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.")"
631 exit $status
632 fi
633 }