From 7b8988e113b44b9a2d806dde6161c133750c14e5 Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Thu, 28 May 2009 11:40:15 +0200 Subject: Documentation: teach stash/pop workflow instead of stash/apply Recent discussion on the list showed some comments in favour of a stash/pop workflow: http://marc.info/?l=git&m=124234911423358&w=2 http://marc.info/?l=git&m=124235348327711&w=2 Change the stash documentation and examples to document pop in its own right (and apply in terms of pop), and use stash/pop in the examples. Signed-off-by: Thomas Rast Signed-off-by: Junio C Hamano --- Documentation/git-stash.txt | 30 ++++++++++++++++-------------- Documentation/user-manual.txt | 4 ++-- 2 files changed, 18 insertions(+), 16 deletions(-) (limited to 'Documentation') diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt index 051f94d26f..1cc24cc47e 100644 --- a/Documentation/git-stash.txt +++ b/Documentation/git-stash.txt @@ -75,14 +75,22 @@ show []:: it will accept any format known to 'git-diff' (e.g., `git stash show -p stash@\{1}` to view the second most recent stash in patch form). -apply [--index] []:: +pop []:: - Restore the changes recorded in the stash on top of the current - working tree state. When no `` is given, applies the latest - one. The working directory must match the index. + Remove a single stashed state from the stash list and apply it + on top of the current working tree state, i.e., do the inverse + operation of `git stash save`. The working directory must + match the index. + -This operation can fail with conflicts; you need to resolve them -by hand in the working tree. +Applying the state can fail with conflicts; in this case, it is not +removed from the stash list. You need to resolve the conflicts by hand +and call `git stash drop` manually afterwards. ++ +When no `` is given, `stash@\{0}` is assumed. See also `apply`. + +apply [--index] []:: + + Like `pop`, but do not remove the state from the stash list. + If the `--index` option is used, then tries to reinstate not only the working tree's changes, but also the index's ones. However, this can fail, when you @@ -112,12 +120,6 @@ drop []:: Remove a single stashed state from the stash list. When no `` is given, it removes the latest one. i.e. `stash@\{0}` -pop []:: - - Remove a single stashed state from the stash list and apply on top - of the current working tree state. When no `` is given, - `stash@\{0}` is assumed. See also `apply`. - create:: Create a stash (which is a regular commit object) and return its @@ -163,7 +165,7 @@ $ git pull file foobar not up to date, cannot merge. $ git stash $ git pull -$ git stash apply +$ git stash pop ---------------------------------------------------------------- Interrupted workflow:: @@ -192,7 +194,7 @@ You can use 'git-stash' to simplify the above, like this: $ git stash $ edit emergency fix $ git commit -a -m "Fix in a hurry" -$ git stash apply +$ git stash pop # ... continue hacking ... ---------------------------------------------------------------- diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index dbbeb7e7c7..0b88a51d0b 100644 --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -1520,10 +1520,10 @@ $ git commit -a -m "blorpl: typofix" ------------------------------------------------ After that, you can go back to what you were working on with -`git stash apply`: +`git stash pop`: ------------------------------------------------ -$ git stash apply +$ git stash pop ------------------------------------------------ -- cgit v1.2.3 From 40bad52d7d559177e373127f50c7bb3a19d56d85 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 2 Jun 2009 07:57:39 -0700 Subject: Update draft release notes for 1.6.3.2 Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.6.3.2.txt | 40 +++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 14 deletions(-) (limited to 'Documentation') diff --git a/Documentation/RelNotes-1.6.3.2.txt b/Documentation/RelNotes-1.6.3.2.txt index a3fceebb11..0b48d1a1df 100644 --- a/Documentation/RelNotes-1.6.3.2.txt +++ b/Documentation/RelNotes-1.6.3.2.txt @@ -8,44 +8,56 @@ Fixes since v1.6.3.1 casting the (char *) pointer to (int *); GCC 4.4 did not like this, and aborted compilation. - * http-push had a small use-after-free bug. - - * command completion code in bash did not reliably detect that we are - in a bare repository. - - * "git for-each-ref" had a segfaulting bug when dealing with a tag object - created by an ancient git. - * Some unlink(2) failures went undiagnosed. * The "recursive" merge strategy misbehaved when faced rename/delete conflicts while coming up with an intermediate merge base. + * The low-level merge algorithm did not handle a degenerate case of + merging a file with itself using itself as the common ancestor + gracefully. It should produce the file itself, but instead + produced an empty result. + * GIT_TRACE mechanism segfaulted when tracing a shell-quoted aliases. + * OpenBSD also uses st_ctimspec in "struct stat", instead of "st_ctim". + + * With NO_CROSS_DIRECTORY_HARDLINKS, "make install" can be told not to + create hardlinks between $(gitexecdir)/git-$builtin_commands and + $(bindir)/git. + + * command completion code in bash did not reliably detect that we are + in a bare repository. + * "git add ." in an empty directory complained that pathspec "." did not match anything, which may be technically correct, but not useful. We silently make it a no-op now. + * "git add -p" (and "patch" action in "git add -i") was broken when + the first hunk that adds a line at the top was split into two and + both halves are marked to be used. + + * "git for-each-ref" had a segfaulting bug when dealing with a tag object + created by an ancient git. + * "git format-patch -k" still added patch numbers if format.numbered configuration was set. - * OpenBSD also uses st_ctimspec in "struct stat", instead of "st_ctim". + * "git grep --color ''" did not terminate. - * With NO_CROSS_DIRECTORY_HARDLINKS, "make install" can be told not to - create hardlinks between $(gitexecdir)/git-$builtin_commands and - $(bindir)/git. + * http-push had a small use-after-free bug. * "git push" was converting OFS_DELTA pack representation into less efficient REF_DELTA representation unconditionally upon transfer, making the transferred data unnecessarily larger. + * "git remote show origin" segfaulted when origin was still empty. + Many other general usability updates around help text, diagnostic messages and documentation are included as well. --- exec >/var/tmp/1 -O=v1.6.3.1-51-g2a1feb9 +O=v1.6.3.1-68-g456cb4c echo O=$(git describe maint) git shortlog --no-merges $O..maint - -- cgit v1.2.3