@matheusbsbs / matheus-bagliano / commits / 2b7460d167
Fork 0

doc: stash: split options from description (1)

This patch moves blocks of text as-is to make it easier to review the next patch. Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Alexandr Miloslavskiy committed Feb 17, 2020 at 17:25 UTC 2b7460d16719b751f025094ba9c8d10c81a6c4b1
1 file changed +35 -33
Documentation/git-stash.txt
+35 -33
@@ -58,31 +58,6 @@ non-option arguments are not allowed to prevent a misspelled
58 subcommand from making an unwanted stash entry. The two exceptions to this
59 are `stash -p` which acts as alias for `stash push -p` and pathspecs,
60 which are allowed after a double hyphen `--` for disambiguation.
61 -+
62 -When pathspec is given to 'git stash push', the new stash entry records the
63 -modified states only for the files that match the pathspec. The index
64 -entries and working tree files are then rolled back to the state in
65 -HEAD only for these files, too, leaving files that do not match the
66 -pathspec intact.
67 -+
68 -If the `--keep-index` option is used, all changes already added to the
69 -index are left intact.
70 -+
71 -If the `--include-untracked` option is used, all untracked files are also
72 -stashed and then cleaned up with `git clean`, leaving the working directory
73 -in a very clean state. If the `--all` option is used instead then the
74 -ignored files are stashed and cleaned in addition to the untracked files.
75 -+
76 -With `--patch`, you can interactively select hunks from the diff
77 -between HEAD and the working tree to be stashed. The stash entry is
78 -constructed such that its index state is the same as the index state
79 -of your repository, and its worktree contains only the changes you
80 -selected interactively. The selected changes are then rolled back
81 -from your worktree. See the ``Interactive Mode'' section of
82 -linkgit:git-add[1] to learn how to operate the `--patch` mode.
83 -+
84 -The `--patch` option implies `--keep-index`. You can use
85 -`--no-keep-index` to override this.
61
62 save [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all] [-q|--quiet] [<message>]::
63
@@ -128,14 +103,6 @@ pop [--index] [-q|--quiet] [<stash>]::
103 Applying the state can fail with conflicts; in this case, it is not
104 removed from the stash list. You need to resolve the conflicts by hand
105 and call `git stash drop` manually afterwards.
131 -+
132 -If the `--index` option is used, then tries to reinstate not only the working
133 -tree's changes, but also the index's ones. However, this can fail, when you
134 -have conflicts (which are stored in the index, where you therefore can no
135 -longer apply the changes as they were originally).
136 -+
137 -When no `<stash>` is given, `stash@{0}` is assumed, otherwise `<stash>` must
138 -be a reference of the form `stash@{<revision>}`.
106
107 apply [--index] [-q|--quiet] [<stash>]::
108
@@ -185,6 +152,41 @@ store::
152 reflog. This is intended to be useful for scripts. It is
153 probably not the command you want to use; see "push" above.
154
155 +If the `--all` option is used instead then the
156 +ignored files are stashed and cleaned in addition to the untracked files.
157 +
158 +If the `--include-untracked` option is used, all untracked files are also
159 +stashed and then cleaned up with `git clean`, leaving the working directory
160 +in a very clean state.
161 +
162 +If the `--index` option is used, then tries to reinstate not only the working
163 +tree's changes, but also the index's ones. However, this can fail, when you
164 +have conflicts (which are stored in the index, where you therefore can no
165 +longer apply the changes as they were originally).
166 +
167 +If the `--keep-index` option is used, all changes already added to the
168 +index are left intact.
169 +
170 +With `--patch`, you can interactively select hunks from the diff
171 +between HEAD and the working tree to be stashed. The stash entry is
172 +constructed such that its index state is the same as the index state
173 +of your repository, and its worktree contains only the changes you
174 +selected interactively. The selected changes are then rolled back
175 +from your worktree. See the ``Interactive Mode'' section of
176 +linkgit:git-add[1] to learn how to operate the `--patch` mode.
177 ++
178 +The `--patch` option implies `--keep-index`. You can use
179 +`--no-keep-index` to override this.
180 +
181 +When pathspec is given to 'git stash push', the new stash entry records the
182 +modified states only for the files that match the pathspec. The index
183 +entries and working tree files are then rolled back to the state in
184 +HEAD only for these files, too, leaving files that do not match the
185 +pathspec intact.
186 +
187 +When no `<stash>` is given, `stash@{0}` is assumed, otherwise `<stash>` must
188 +be a reference of the form `stash@{<revision>}`.
189 +
190 DISCUSSION
191 ----------
192