Merge branch 'sg/stash-k-i'

* sg/stash-k-i:
  Documentation: tweak use case in "git stash save --keep-index"
  stash: introduce 'stash save --keep-index' option
This commit is contained in:
Junio C Hamano
2008-07-13 15:15:27 -07:00
3 changed files with 52 additions and 6 deletions

View File

@ -1163,8 +1163,19 @@ _git_show ()
_git_stash ()
{
local subcommands='save list show apply clear drop pop create'
if [ -z "$(__git_find_subcommand "$subcommands")" ]; then
local subcommand="$(__git_find_subcommand "$subcommands")"
if [ -z "$subcommand" ]; then
__gitcomp "$subcommands"
else
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$subcommand,$cur" in
save,--*)
__gitcomp "--keep-index"
;;
*)
COMPREPLY=()
;;
esac
fi
}