summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-07-28 17:34:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-07-28 17:34:42 (GMT)
commit2c608e0f7c1f0fb9fb3e42eb737d7b8543e11400 (patch)
tree2cec172b7ded4719fa38dc4df8ab5183ecea12af /contrib
parentd0b6966e3dc0a1aca8b7aa89dd0f95cda50d21f2 (diff)
parent080739ba1db7897dde53427937acc011ea98a006 (diff)
downloadgit-2c608e0f7c1f0fb9fb3e42eb737d7b8543e11400.zip
git-2c608e0f7c1f0fb9fb3e42eb737d7b8543e11400.tar.gz
git-2c608e0f7c1f0fb9fb3e42eb737d7b8543e11400.tar.bz2
Merge branch 'nd/worktree-lock'
"git worktree prune" protected worktrees that are marked as "locked" by creating a file in a known location. "git worktree" command learned a dedicated command pair to create and remove such a file, so that the users do not have to do this with editor. * nd/worktree-lock: worktree.c: find_worktree() search by path suffix worktree: add "unlock" command worktree: add "lock" command worktree.c: add is_worktree_locked() worktree.c: add is_main_worktree() worktree.c: add find_worktree()
Diffstat (limited to 'contrib')
-rw-r--r--contrib/completion/git-completion.bash5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 37888f4..10f6d52 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2693,7 +2693,7 @@ _git_whatchanged ()
_git_worktree ()
{
- local subcommands="add list prune"
+ local subcommands="add list lock prune unlock"
local subcommand="$(__git_find_on_cmdline "$subcommands")"
if [ -z "$subcommand" ]; then
__gitcomp "$subcommands"
@@ -2705,6 +2705,9 @@ _git_worktree ()
list,--*)
__gitcomp "--porcelain"
;;
+ lock,--*)
+ __gitcomp "--reason"
+ ;;
prune,--*)
__gitcomp "--dry-run --expire --verbose"
;;