aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-04-26 15:39:12 +0900
committerJunio C Hamano <gitster@pobox.com>2017-04-26 15:39:12 +0900
commite31159746e30a24d7064bf30491ccd73444eb00a (patch)
tree4fc61f845670e28417a989d24fc37e7e91d645d3 /Documentation
parent7ba7bff6294153449453b27ebdcb2ad2e751736d (diff)
parent507e6e9eecce5e7a2cc204c844bbb2f9b17b31e3 (diff)
downloadgit-e31159746e30a24d7064bf30491ccd73444eb00a.tar.gz
git-e31159746e30a24d7064bf30491ccd73444eb00a.tar.xz
Merge branch 'nd/worktree-add-lock'
Allow to lock a worktree immediately after it's created. This helps prevent a race between "git worktree add; git worktree lock" and "git worktree prune". * nd/worktree-add-lock: worktree add: add --lock option
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-worktree.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index 553cf8413..b472acc35 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -9,7 +9,7 @@ git-worktree - Manage multiple working trees
SYNOPSIS
--------
[verse]
-'git worktree add' [-f] [--detach] [--checkout] [-b <new-branch>] <path> [<branch>]
+'git worktree add' [-f] [--detach] [--checkout] [--lock] [-b <new-branch>] <path> [<branch>]
'git worktree list' [--porcelain]
'git worktree lock' [--reason <string>] <worktree>
'git worktree prune' [-n] [-v] [--expire <expire>]
@@ -107,6 +107,11 @@ OPTIONS
such as configuring sparse-checkout. See "Sparse checkout"
in linkgit:git-read-tree[1].
+--lock::
+ Keep the working tree locked after creation. This is the
+ equivalent of `git worktree lock` after `git worktree add`,
+ but without race condition.
+
-n::
--dry-run::
With `prune`, do not remove anything; just report what it would