From: Nguyễn Thái Ngọc Duy Date: Tue, 10 May 2016 14:17:28 GMT Subject: [PATCH 4/5] worktree: add "lock" command Message-ID: <20160510141729.23063-4-pclouds@gmail.com> In-Reply-To: <20160510141729.23063-1-pclouds@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-worktree.txt | 12 ++++++++-- builtin/worktree.c | 41 ++++++++++++++++++++++++++++++++++ contrib/completion/git-completion.bash | 5 ++++- t/t2028-worktree-move.sh (new +x) | 34 ++++++++++++++++++++++++++++ 4 files changed, 89 insertions(+), 3 deletions(-) create mode 100755 t/t2028-worktree-move.sh diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index 27feff6..74583c1 100644 --- a/Documentation/git-worktree.txt +++ b/Documentation/git-worktree.txt @@ -11,6 +11,7 @@ SYNOPSIS [verse] 'git worktree add' [-f] [--detach] [--checkout] [-b ] [] 'git worktree list' [--porcelain] +'git worktree lock' [--reason ] 'git worktree prune' [-n] [-v] [--expire ] DESCRIPTION @@ -61,6 +62,12 @@ each of the linked worktrees. The output details include if the worktree is bare, the revision currently checked out, and the branch currently checked out (or 'detached HEAD' if none). +lock:: + +When a worktree is locked, it cannot be pruned, moved or deleted. For +example, if the worktree is on portable device that is not available +when "git worktree " is executed. + prune:: Prune working tree information in $GIT_DIR/worktrees. @@ -110,6 +117,9 @@ OPTIONS --expire