Skip to content

worktree lock, move, remove and unlock

Nguyễn Thái Ngọc Duy git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest25 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/25usage.c: move format processing out of die_errno()usage.c+15 -100 replies
2/25usage.c: add sys_error() that prints strerror() automaticallygit-compat-util.h usage.c+11 -00 replies
3/25copy.c: import copy_file() from busyboxcopy.c+331 -00 replies
4/25copy.c: delete unused code in copy_file()copy.c+7 -940 replies
5/25copy.c: convert bb_(p)error_msg to (sys_)errorcopy.c+31 -540 replies
6/25copy.c: style fixcopy.c+29 -210 replies
7/25copy.c: convert copy_file() to copy_dir_recursively()cache.h copy.c+179 -380 replies
8/25completion: support git-worktreecontrib/completion/git-completion.bash+23 -00 replies
9/25git-worktree.txt: keep subcommand listing in alphabetical orderDocumentation/git-worktree.txt builtin/worktree.c+6 -60 replies
10/25path.c: add git_common_path() and strbuf_git_common_path()cache.h path.c+32 -00 replies
11/25worktree.c: use is_dot_or_dotdot()builtin/worktree.c worktree.c+3 -20 replies
12/25worktree.c: store "id" instead of "git_dir"worktree.c worktree.h+22 -140 replies
13/25worktree.c: add clear_worktree()worktree.c worktree.h+16 -30 replies
14/25worktree.c: add find_worktree_by_path()worktree.c worktree.h+22 -00 replies
15/25worktree.c: add is_main_worktree()worktree.c worktree.h+10 -00 replies
16/25worktree.c: add validate_worktree()worktree.c worktree.h+68 -00 replies
17/25worktree.c: add update_worktree_location()worktree.c worktree.h+31 -00 replies
18/25worktree.c: add is_worktree_locked()worktree.c worktree.h+24 -00 replies
19/25worktree: avoid 0{40}, too many zeroes, hard to readbuiltin/worktree.c+1 -10 replies
20/25worktree: simplify prefixing pathsbuiltin/worktree.c+3 -10 replies
21/25worktree: add "lock" commandDocumentation/git-worktree.txt builtin/worktree.c contrib/completion/git-completion.bash +1 more+89 -30 replies
22/25worktree: add "unlock" commandDocumentation/git-worktree.txt builtin/worktree.c contrib/completion/git-completion.bash +1 more+51 -10 replies
23/25worktree: add "move" commmandDocumentation/git-worktree.txt builtin/worktree.c contrib/completion/git-completion.bash +1 more+95 -20 replies
24/25worktree move: accept destination as directorybuiltin/worktree.c+18 -16 replies
25/25worktree: add "remove" commandDocumentation/git-worktree.txt builtin/worktree.c contrib/completion/git-completion.bash +1 more+124 -100 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/25] worktree lock, move, remove and unlock

This is basically a resend from last time, which happened during rc time. It adds 4 more commands, basically cleaning up the "TODO" list in git-worktree.txt.

So far I've only actually used move and remove (and maybe unlock once because worktree-add failed on me and I had to unlock it manually). And I don't get to move worktrees a lot either so not really extensive testing.

[01/25] usage.c: move format processing out of die_errno() [02/25] usage.c: add sys_error() that prints strerror() automatically [03/25] copy.c: import copy_file() from busybox
[04/25] copy.c: delete unused code in copy_file()
[05/25] copy.c: convert bb_(p)error_msg to (sys_)error [06/25] copy.c: style fix
[07/25] copy.c: convert copy_file() to copy_dir_recursively() [08/25] completion: support git-worktree
[09/25] git-worktree.txt: keep subcommand listing in alphabetical order [10/25] path.c: add git_common_path() and strbuf_git_common_path() [11/25] worktree.c: use is_dot_or_dotdot()
[12/25] worktree.c: store "id" instead of "git_dir"
[13/25] worktree.c: add clear_worktree()
[14/25] worktree.c: add find_worktree_by_path()
[15/25] worktree.c: add is_main_worktree()
[16/25] worktree.c: add validate_worktree()
[17/25] worktree.c: add update_worktree_location()
[18/25] worktree.c: add is_worktree_locked()
[19/25] worktree: avoid 0{40}, too many zeroes, hard to read [20/25] worktree: simplify prefixing paths
[21/25] worktree: add "lock" command
[22/25] worktree: add "unlock" command
[23/25] worktree: add "move" commmand
[24/25] worktree move: accept destination as directory [25/25] worktree: add "remove" command

Total 11 files changed, 1028 insertions(+), 48 deletions(-)