git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 16, 2017, 21:24 UTC
Message-ID
<xmqqmv97wrqc.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170616043050.29192-2-liambeguin@gmail.com>
Liam Beguin <liambeguin@gmail.com> writes:
Show 23 quoted lines
> 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 <liambeguin@gmail.com>
> ---
> 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] [<message>]::
>  push [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all] [-q|--quiet] [-m|--message <message>] [--] [<pathspec>...]::
>  
> -	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 <message> 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.

Show 7 quoted lines
>  list [<options>]::
>  
> -	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.
Show 7 quoted lines
> @@ -105,11 +105,11 @@ command to control what is shown and how. See linkgit:git-log[1].
>  
>  show [<stash>]::
>  
> -	Show the changes recorded in the stash as a diff between the
> -	stashed state and its original parent. When no `<stash>` 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 `<stash>` 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".

Show 10 quoted lines
> @@ -149,26 +149,27 @@ branch <branchname> [<stash>]::
>  +
>  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] [<stash>]::
>  
> -	Remove a single stashed state from the stash list. When no `<stash>`
> +	Remove a single stashed entry from the stash list. When no `<stash>`
A single 'stash entry' is being removed from the list of stash entries.
Previous: Jeff KingNext: Liam Beguin
Message 4 of 16 in “add stash count information to git-status command”
  1. 0/3 add stash count information to git-status commandLiam Beguin, Jun 16, 2017
  2. 1/3 stash: update documentation to use 'stash entries'Liam Beguin, Jun 16, 2017
  3. Jeff KingJun 16, 2017
  4. Junio C HamanoJun 16, 2017
  5. 2/3 wt-status: add optional stash status informationLiam Beguin, Jun 16, 2017
  6. Jeff KingJun 16, 2017
  7. Junio C HamanoJun 16, 2017
  8. 3/3 glossary: define stash entriesLiam Beguin, Jun 16, 2017
  9. Jeff KingJun 16, 2017
  10. Jeff KingJun 16, 2017
  11. Liam BeguinJun 16, 2017
  12. 0/3 add stash count information to git-status commandLiam Beguin, Jun 17, 2017
  13. 3/3 glossary: define 'stash entry'Liam Beguin, Jun 17, 2017
  14. 1/3 stash: update documentation to use 'stash entry'Liam Beguin, Jun 17, 2017
  15. 2/3 status: add optional stash count informationLiam Beguin, Jun 17, 2017
  16. Junio C HamanoJun 19, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.