Re: [PATCH 1/3] stash: update documentation to use 'stash entries'

2017-06-16 Thread Junio C Hamano
Liam Beguin  writes:

> Most of the time, a 'stash entry' is called a 'stash'
> or a 'stash state'. Lets use 'stash entry' instead.
>
> Signed-off-by: Liam Beguin 
> ---
> diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt
> index 70191d06b69e..59979ad31dfe 100644
> --- a/Documentation/git-stash.txt
> +++ b/Documentation/git-stash.txt
> @@ -51,18 +51,18 @@ OPTIONS
>  save [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all] 
> [-q|--quiet] []::
>  push [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all] 
> [-q|--quiet] [-m|--message ] [--] [...]::
>  
> - Save your local modifications to a new 'stash' and roll them
> + Save your local modifications to a new 'stash entry' and roll them
>   back to HEAD (in the working tree and in the index).
>   The  part is optional and gives
>   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.  The two exceptions to this
> +subcommand from making an unwanted entry.  The two exceptions to this

It is more clear to spell it out as 'unwanted stash entry' in the
context of this sentence.

>  list []::
>  
> - List the stashes that you currently have.  Each 'stash' is listed
> - with its name (e.g. `stash@{0}` is the latest stash, `stash@{1}` is
> + List the stash entries that you currently have.  Each 'stash entry' is
> + listed with its name (e.g. `stash@{0}` is the latest entry, `stash@{1}` 
> is
>   the one before, etc.), the name of the branch that was current when the

Unlike the previous one, 'the latest entry' here is clear enough
that it is talking about 'the latest stash entry' from the context,
and I think this paragraph is good.

> - stash was made, and a short description of the commit the stash was
> + entry was made, and a short description of the commit the entry was

So is this one.

> @@ -105,11 +105,11 @@ command to control what is shown and how. See 
> linkgit:git-log[1].
>  
>  show []::
>  
> - Show the changes recorded in the stash as a diff between the
> - stashed state and its original parent. When no `` is given,
> + Show the changes recorded in the stash entry as a diff between the

This is good, but...

> + stashed entry and its original parent. When no `` is given, it

... the original phrasing "stashed state" is better than this
rewrite, because a "stash entry" is a vessel that holds a set of
"stashed states" (the working tree state, the state of the index,
and the contents of untracked files).

I think what is shown is "between the stashed contents of the
working tree and the commit back when the stash entry was created".

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

Again, I do not think the last one should be made into "stashed
entry".  We are restoring the stashed state, recorded in the named
'stash entry'.

>  clear::
> - Remove all the stashed states. Note that those states will then
> + Remove all the stashed entries. Note that those entries will then

This is removing 'all the stash entries'.

>  drop [-q|--quiet] []::
>  
> - Remove a single stashed state from the stash list. When no ``
> + Remove a single stashed entry from the stash list. When no ``

A single 'stash entry' is being removed from the list of stash entries.


Re: [PATCH 1/3] stash: update documentation to use 'stash entries'

2017-06-16 Thread Jeff King
On Fri, Jun 16, 2017 at 12:30:48AM -0400, Liam Beguin wrote:

> Most of the time, a 'stash entry' is called a 'stash'
> or a 'stash state'. Lets use 'stash entry' instead.

I agree that this reads better. There is one exception:

> diff --git a/git-stash.sh b/git-stash.sh
> index 2fb651b2b8d9..0dfa4785f361 100755
> --- a/git-stash.sh
> +++ b/git-stash.sh
> @@ -481,7 +481,7 @@ parse_flags_and_rev()
>  
>   case $# in
>   0)
> - have_stash || die "$(gettext "No stash found.")"
> + have_stash || die "$(gettext "No stash entry found.")"
>   set -- ${ref_stash}@{0}

I don't think your change is wrong (and it's probably more grammatical
than the original), but should this perhaps be "No stashes found" or "No
stash entries found"?

-Peff


[PATCH 1/3] stash: update documentation to use 'stash entries'

2017-06-15 Thread Liam Beguin
Most of the time, a 'stash entry' is called a 'stash'
or a 'stash state'. Lets use 'stash entry' instead.

Signed-off-by: Liam Beguin 
---
 Documentation/config.txt |  6 +++---
 Documentation/git-pull.txt   |  2 +-
 Documentation/git-rebase.txt |  2 +-
 Documentation/git-stash.txt  | 49 ++--
 Documentation/gitcli.txt |  2 +-
 git-stash.sh |  6 +++---
 6 files changed, 34 insertions(+), 33 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index f6278a5ae6a1..23b807065d92 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -2620,7 +2620,7 @@ rebase.autoSquash::
If set to true enable `--autosquash` option by default.
 
 rebase.autoStash::
-   When set to true, automatically create a temporary stash
+   When set to true, automatically create a temporary stash entry
before the operation begins, and apply it after the operation
ends.  This means that you can run rebase on a dirty worktree.
However, use with care: the final stash application after a
@@ -3029,12 +3029,12 @@ status.submoduleSummary::
 
 stash.showPatch::
If this is set to true, the `git stash show` command without an
-   option will show the stash in patch form.  Defaults to false.
+   option will show the stash entry in patch form.  Defaults to false.
See description of 'show' command in linkgit:git-stash[1].
 
 stash.showStat::
If this is set to true, the `git stash show` command without an
-   option will show diffstat of the stash.  Defaults to true.
+   option will show diffstat of the stash entry.  Defaults to true.
See description of 'show' command in linkgit:git-stash[1].
 
 submodule..url::
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index e414185f5a6a..9db5e08f4a63 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -131,7 +131,7 @@ unless you have read linkgit:git-rebase[1] carefully.
 --autostash::
 --no-autostash::
Before starting rebase, stash local modifications away (see
-   linkgit:git-stash[1]) if needed, and apply the stash when
+   linkgit:git-stash[1]) if needed, and apply the stash entry when
done. `--no-autostash` is useful to override the `rebase.autoStash`
configuration variable (see linkgit:git-config[1]).
 +
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index 53f4e14a..a5afd602d8eb 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -446,7 +446,7 @@ used to override and disable this setting.
 
 --autostash::
 --no-autostash::
-   Automatically create a temporary stash before the operation
+   Automatically create a temporary stash entry before the operation
begins, and apply it after the operation ends.  This means
that you can run rebase on a dirty worktree.  However, use
with care: the final stash application after a successful
diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt
index 70191d06b69e..59979ad31dfe 100644
--- a/Documentation/git-stash.txt
+++ b/Documentation/git-stash.txt
@@ -51,18 +51,18 @@ OPTIONS
 save [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all] 
[-q|--quiet] []::
 push [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all] 
[-q|--quiet] [-m|--message ] [--] [...]::
 
-   Save your local modifications to a new 'stash' and roll them
+   Save your local modifications to a new 'stash entry' and roll them
back to HEAD (in the working tree and in the index).
The  part is optional and gives
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.  The two exceptions to this
+subcommand from making an unwanted entry.  The two exceptions to this
 are `stash -p` which acts as alias for `stash push -p` and pathspecs,
 which are allowed after a double hyphen `--` for disambiguation.
 +
-When pathspec is given to 'git stash push', the new stash records the
+When pathspec is given to 'git stash push', the new stash entry records the
 modified states only for the files that match the pathspec.  The index
 entries and working tree files are then rolled back to the state in
 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
 
 list []::
 
-   List the stashes that you currently have.  Each 'stash' is listed
-   with its name (e.g. `stash@{0}` is the latest stash, `stash@{1}` is
+   List the stash entries that you currently have.  Each 'stash entry' is
+   listed with its name (e.g. `stash@{0}` is the latest entry, `stash@{1}` 
is
the one before, etc.), the