mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-26 04:30:27 +01:00
Nikolai Weibull: 28911: Only show modified files for git-checkout without tree.
This commit is contained in:
parent
9e2278e0c1
commit
b85b9a229d
2 changed files with 7 additions and 4 deletions
|
|
@ -396,7 +396,7 @@ _git-checkout () {
|
|||
# TODO: Allow A...B
|
||||
local branch_arg='branches::__git_revisions' \
|
||||
tree_ish_arg='tree-ishs::__git_tree_ishs' \
|
||||
file_arg='files::__git_cached_files'
|
||||
file_arg='modified-files::__git_modified_files'
|
||||
|
||||
if [[ -n ${opt_args[(I)-b|-B|--orphan]} ]]; then
|
||||
tree_ish_arg=
|
||||
|
|
@ -418,7 +418,7 @@ _git-checkout () {
|
|||
elif [[ -n $line[1] ]] && __git_is_treeish $line[1]; then
|
||||
__git_ignore_line __git_tree_files ${PREFIX:-.} $line[1] && ret=0
|
||||
else
|
||||
__git_ignore_line __git_cached_files && ret=0
|
||||
__git_ignore_line __git_modified_files && ret=0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue