Merge branch 'nd/worktree-cleanup-post-head-protection'
Further preparatory clean-up for "worktree" feature continues. * nd/worktree-cleanup-post-head-protection: worktree: simplify prefixing paths worktree: avoid 0{40}, too many zeroes, hard to read worktree.c: use is_dot_or_dotdot() git-worktree.txt: keep subcommand listing in alphabetical order worktree.c: rewrite mark_current_worktree() to avoid strbuf completion: support git-worktree
This commit is contained in:
@ -2691,6 +2691,29 @@ _git_whatchanged ()
|
||||
_git_log
|
||||
}
|
||||
|
||||
_git_worktree ()
|
||||
{
|
||||
local subcommands="add list prune"
|
||||
local subcommand="$(__git_find_on_cmdline "$subcommands")"
|
||||
if [ -z "$subcommand" ]; then
|
||||
__gitcomp "$subcommands"
|
||||
else
|
||||
case "$subcommand,$cur" in
|
||||
add,--*)
|
||||
__gitcomp "--detach"
|
||||
;;
|
||||
list,--*)
|
||||
__gitcomp "--porcelain"
|
||||
;;
|
||||
prune,--*)
|
||||
__gitcomp "--dry-run --expire --verbose"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
__git_main ()
|
||||
{
|
||||
local i c=1 command __git_dir
|
||||
|
Reference in New Issue
Block a user