Skip to content

Commit

Permalink
DWIM 'git stash save -p' for 'git stash -p'
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Thomas Rast authored and Junio C Hamano committed Aug 15, 2009
1 parent 367ea19 commit f300fab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Documentation/git-stash.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions git-stash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")'
;;
Expand Down

0 comments on commit f300fab

Please sign in to comment.