@matheusbsbs / matheus-bagliano / commits / b0c6bf4a87
Fork 0

detached-stash: update Documentation

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

Jon Seymour committed Aug 21, 2010 at 14:09 UTC b0c6bf4a873d5e178f59aa400d994c2bf58f3bd7
1 file changed +11 -5
Documentation/git-stash.txt
+11 -5
@@ -104,18 +104,22 @@ tree's changes, but also the index's ones. However, this can fail, when you
104 have conflicts (which are stored in the index, where you therefore can no
105 longer apply the changes as they were originally).
106 +
107 -When no `<stash>` is given, `stash@\{0}` is assumed.
107 +When no `<stash>` is given, `stash@\{0}` is assumed, otherwise `<stash>` must
108 +be a reference of the form `stash@\{<revision>}`.
109
110 apply [--index] [-q|--quiet] [<stash>]::
111
111 - Like `pop`, but do not remove the state from the stash list.
112 + Like `pop`, but do not remove the state from the stash list. Unlike `pop`,
113 + `<stash>` may be any commit that looks like a commit created by
114 + `stash save` or `stash create`.
115
116 branch <branchname> [<stash>]::
117
118 Creates and checks out a new branch named `<branchname>` starting from
119 the commit at which the `<stash>` was originally created, applies the
117 - changes recorded in `<stash>` to the new working tree and index, then
118 - drops the `<stash>` if that completes successfully. When no `<stash>`
120 + changes recorded in `<stash>` to the new working tree and index.
121 + If that succeeds, and `<stash>` is a reference of the form
122 + `stash@{<revision>}`, it then drops the `<stash>`. When no `<stash>`
123 is given, applies the latest one.
124 +
125 This is useful if the branch on which you ran `git stash save` has
@@ -132,7 +136,9 @@ clear::
136 drop [-q|--quiet] [<stash>]::
137
138 Remove a single stashed state from the stash list. When no `<stash>`
135 - is given, it removes the latest one. i.e. `stash@\{0}`
139 + is given, it removes the latest one. i.e. `stash@\{0}`, otherwise
140 + `<stash>` must a valid stash log reference of the form
141 + `stash@\{<revision>}`.
142
143 create::
144