Skip to content

Support using submodules with worktrees

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 Latest10 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10doc: about submodule support with multiple worktreesDocumentation/git-worktree.txt Documentation/gitsubmodules.txt+25 -02 replies
2/10submodule--helper: add missing \nbuiltin/submodule--helper.c+1 -10 replies
3/10submodule add: support multiple worktreesbuiltin/submodule--helper.c git-submodule.sh t/t2405-worktree-submodules.sh+61 -61 reply
4/10submodule init: support multiple worktreesbuiltin/submodule--helper.c t/t2405-worktree-submodules.sh+33 -90 replies
5/10submodule update: add tests for multiple worktreest/t2405-worktree-submodules.sh+11 -00 replies
6/10submodule sync: support multiple worktreesbuiltin/submodule--helper.c t/t2405-worktree-submodules.sh+40 -50 replies
7/10submodule deinit: support multiple worktreesbuiltin/submodule--helper.c t/t2405-worktree-submodules.sh+17 -20 replies
8/10submodule clone: use repo_config_set()builtin/submodule--helper.c config.c config.h +2 more+36 -240 replies
9/10submodule clone: propagate extensions.worktreeConfigbuiltin/submodule--helper.c+1 -00 replies
10/10submodule ensure-core-worktree: write to config.worktreebuiltin/submodule--helper.c+3 -50 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC/PATCH 00/10] Support using submodules with worktrees

Since this topic has come up twice recently, I'll take this opportunity to gather early comments on this series. It depends nd/config-move-to and at least has one known problem reported Tomasz. But I'll fix that later once nd/config-move-to lands.

For more details, head for 01/10. This basically makes it possible to create secondary worktrees in either supermodules or submodules. The user will be required to turn on extensions.worktreeConfig and this is something I'll need to work on, to make the transition smoother.

Note that while it works, it's not really optimal because worktree clones of the same submodule could be duplicated. But hopefully I could tackle this one step at a time. Make it work first, shake out bugs, then think about sharing repos.

Nguyễn Thái Ngọc Duy (10):
doc: about submodule support with multiple worktrees
submodule--helper: add missing \n
submodule add: support multiple worktrees submodule init: support multiple worktrees submodule update: add tests for multiple worktrees submodule sync: support multiple worktrees submodule deinit: support multiple worktrees submodule clone: use repo_config_set() submodule clone: propagate extensions.worktreeConfig submodule ensure-core-worktree: write to config.worktree

 Documentation/git-worktree.txt  |   8 ++
 Documentation/gitsubmodules.txt |  17 +++++
 builtin/submodule--helper.c     |  86 ++++++++++++----------
 config.c                        |  10 +++
 config.h                        |   1 +
 git-submodule.sh                |   8 +-
 repository.c                    |  21 ++++--
 repository.h                    |   4 +
 t/t2405-worktree-submodules.sh  | 125 ++++++++++++++++++++++++++++++++
 9 files changed, 228 insertions(+), 52 deletions(-)
 create mode 100755 t/t2405-worktree-submodules.sh
Signature · 1 line
2.20.0.482.g66447595a7