]> git.ipfire.org Git - thirdparty/git.git/commit
worktree: teach `add` to accept --reason <string> with --lock
authorStephen Manz <smanz@alum.mit.edu>
Thu, 15 Jul 2021 02:32:30 +0000 (02:32 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 Jul 2021 20:30:59 +0000 (13:30 -0700)
commit0db4961c49bb70cef89ed3d7c90f8f5d9dfc822d
treef10f2d05c39256c27539c57ecea1be698152b872
parentf7c35ea2a1292d581ca79d395fc978f92a3aec5b
worktree: teach `add` to accept --reason <string> with --lock

The default reason stored in the lock file, "added with --lock",
is unlikely to be what the user would have given in a separate
`git worktree lock` command. Allowing `--reason` to be specified
along with `--lock` when adding a working tree gives the user control
over the reason for locking without needing a second command.

Signed-off-by: Stephen Manz <smanz@alum.mit.edu>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-worktree.txt
builtin/worktree.c
t/t2400-worktree-add.sh