diff options
author | Thomas Rast <trast@student.ethz.ch> | 2009-08-13 14:29:45 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-08-16 00:21:22 +0200 |
commit | f300fab5440f25aabb22c6d1fec411ee10e154b1 (patch) | |
tree | d7253c29cd1e7d47a2848a575a5a827e9ae48fb8 | |
parent | Merge branch 'js/stash-dwim' into tr/reset-checkout-patch (diff) | |
download | git-f300fab5440f25aabb22c6d1fec411ee10e154b1.tar.xz git-f300fab5440f25aabb22c6d1fec411ee10e154b1.zip |
DWIM 'git stash save -p' for 'git stash -p'
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | Documentation/git-stash.txt | 2 | ||||
-rwxr-xr-x | git-stash.sh | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt index 3dc16a108a..1c4ed412a1 100644 --- a/Documentation/git-stash.txt +++ b/Documentation/git-stash.txt @@ -14,7 +14,7 @@ SYNOPSIS 'git stash' ( pop | apply ) [--index] [-q|--quiet] [<stash>] 'git stash' branch <branchname> [<stash>] 'git stash' [save [--patch] [-k|--[no-]keep-index] [-q|--quiet] [<message>]] -'git stash' [-k|--keep-index] +'git stash' [-p|--patch|-k|--keep-index] 'git stash' clear 'git stash' create diff --git a/git-stash.sh b/git-stash.sh index 81a72f68cc..9fd72894c4 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -406,8 +406,8 @@ branch) apply_to_branch "$@" ;; *) - case $#,"$1" in - 0,|1,-k|1,--keep-index) + case $#,"$1","$2" in + 0,,|1,-k,|1,--keep-index,|1,-p,|1,--patch,|2,-p,--no-keep-index|2,--patch,--no-keep-index) save_stash "$@" && say '(To restore them type "git stash apply")' ;; |