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

[PATCH v5 8/8] detached-stash: update Documentation

From
Jon Seymour <jon.seymour@gmail.com>
Date
Aug 18, 2010, 13:48 UTC
Message-ID
<1282139333-5150-5-git-send-email-jon.seymour@gmail.com>
In-Reply-To
<1282139333-5150-1-git-send-email-jon.seymour@gmail.com>

Update the documentation to indicate that git stash branch only attempts to drop the specified stash if it looks like stash reference.

Also changed the synopsis to more clearly indicate which commands require a stash entry reference as opposed to merely a stash-like commit.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
---
 Documentation/git-stash.txt |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt
index 473889a..8728f7a 100644
--- a/Documentation/git-stash.txt
+++ b/Documentation/git-stash.txt
@@ -104,18 +104,22 @@ tree's changes, but also the index's ones. However, this can fail, when you
 have conflicts (which are stored in the index, where you therefore can no
 longer apply the changes as they were originally).
 +
-When no `<stash>` is given, `stash@\{0}` is assumed.
+When no `<stash>` is given, `stash@\{0}` is assumed, otherwise `<stash>` must
+be a reference of the form `stash@\{<revision>}`.
 
 apply [--index] [-q|--quiet] [<stash>]::
 
-	Like `pop`, but do not remove the state from the stash list.
+	Like `pop`, but do not remove the state from the stash list. Unlike `pop`,
+	`<stash>` may be any commit that looks like a commit created by
+	`stash save` or `stash create`.
 
 branch <branchname> [<stash>]::
 
 	Creates and checks out a new branch named `<branchname>` starting from
 	the commit at which the `<stash>` was originally created, applies the
-	changes recorded in `<stash>` to the new working tree and index, then
-	drops the `<stash>` if that completes successfully. When no `<stash>`
+	changes recorded in `<stash>` to the new working tree and index.
+	If that succeeds, and `<stash>` is a reference of the form
+	`stash@{<revision>}`, it then drops the `<stash>`. When no `<stash>`
 	is given, applies the latest one.
 +
 This is useful if the branch on which you ran `git stash save` has
@@ -132,7 +136,9 @@ clear::
 drop [-q|--quiet] [<stash>]::
 
 	Remove a single stashed state from the stash list. When no `<stash>`
-	is given, it removes the latest one. i.e. `stash@\{0}`
+	is given, it removes the latest one. i.e. `stash@\{0}`, otherwise
+	`<stash>` must a valid stash log reference of the form
+	`stash@\{<revision>}`.
 
 create::
 
-- 
1.7.2.1.95.g4fabf
Previous: Johannes Sixt
Message 7 of 7 in “detached-stash: refactor git stash pop implementation”
  1. 4/8 detached-stash: refactor git stash pop implementationJon Seymour, Aug 18, 2010
  2. 5/8 detached-stash: simplify git stash branchJon Seymour, Aug 18, 2010
  3. 6/8 detached-stash: simplify git stash showJon Seymour, Aug 18, 2010
  4. 7/8 detached-stash: tests of git stash with stash-like argumentsJon Seymour, Aug 18, 2010
  5. Jon SeymourAug 18, 2010
  6. Johannes SixtAug 19, 2010
  7. 8/8 detached-stash: update DocumentationJon Seymour, Aug 18, 2010

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.