From: Nguyễn Thái Ngọc Duy Date: Sun, 22 May 2016 10:43:36 GMT Subject: [PATCH v2 0/5] worktree lock/unlock Message-ID: <20160522104341.656-1-pclouds@gmail.com> In-Reply-To: <20160510141416.GA22672@lanh> This should address all of Eric's comments (thanks!). An extra change I made is free_worktrees() at the end of {,un}lock_worktree() to avoid leaking. This series depends on nd/worktree-cleanup-post-head-protection. Interdiff -- 8< -- diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index 9ac1129..e0f2605 100644 --- a/Documentation/git-worktree.txt +++ b/Documentation/git-worktree.txt @@ -40,9 +40,8 @@ section "DETAILS" for more information. If a linked working tree is stored on a portable device or network share which is not always mounted, you can prevent its administrative files from -being pruned by creating a file named 'locked' alongside the other -administrative files, optionally containing a plain text reason that -pruning should be suppressed. See section "DETAILS" for more information. +being pruned by issuing the `git worktree lock` command, optionally +specifying `--reason` to explain why the working tree is locked. COMMANDS -------- @@ -65,9 +64,11 @@ bare, the revision currently checked out, and the branch currently checked out 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. +If a working tree is on a portable device or network share which +is not always mounted, lock it to prevent its administrative +files from being pruned automatically. This also prevents it from +being moved or deleted. Optionally, specify a reason for the lock +with `--reason`. prune:: @@ -123,7 +124,7 @@ OPTIONS With `prune`, only expire unused working trees older than