worktree: add "lock" command

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2016-06-13 19:18:24 +07:00
committed by Junio C Hamano
parent 346ef53058
commit 58142c09a4
4 changed files with 110 additions and 7 deletions

View File

@ -2597,7 +2597,7 @@ _git_whatchanged ()
_git_worktree ()
{
local subcommands="add list prune"
local subcommands="add list lock prune"
local subcommand="$(__git_find_on_cmdline "$subcommands")"
if [ -z "$subcommand" ]; then
__gitcomp "$subcommands"
@ -2609,6 +2609,9 @@ _git_worktree ()
list,--*)
__gitcomp "--porcelain"
;;
lock,--*)
__gitcomp "--reason"
;;
prune,--*)
__gitcomp "--dry-run --expire --verbose"
;;