git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Jan 16, 2019, 10:31 UTC
Message-ID
<20190116103159.9305-1-pclouds@gmail.com>

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
-- 
2.20.0.482.g66447595a7
Next: Nguyễn Thái Ngọc Duy
Message 1 of 14 in “Support using submodules with worktrees”
  1. 00/10 Support using submodules with worktreesNguyễn Thái Ngọc Duy, Jan 16, 2019
  2. 01/10 doc: about submodule support with multiple worktreesNguyễn Thái Ngọc Duy, Jan 16, 2019
  3. Stefan BellerJan 16, 2019
  4. Duy NguyenJan 17, 2019
  5. 02/10 submodule--helper: add missing \nNguyễn Thái Ngọc Duy, Jan 16, 2019
  6. 03/10 submodule add: support multiple worktreesNguyễn Thái Ngọc Duy, Jan 16, 2019
  7. Stefan BellerJan 16, 2019
  8. 04/10 submodule init: support multiple worktreesNguyễn Thái Ngọc Duy, Jan 16, 2019
  9. 05/10 submodule update: add tests for multiple worktreesNguyễn Thái Ngọc Duy, Jan 16, 2019
  10. 06/10 submodule sync: support multiple worktreesNguyễn Thái Ngọc Duy, Jan 16, 2019
  11. 07/10 submodule deinit: support multiple worktreesNguyễn Thái Ngọc Duy, Jan 16, 2019
  12. 08/10 submodule clone: use repo_config_set()Nguyễn Thái Ngọc Duy, Jan 16, 2019
  13. 09/10 submodule clone: propagate extensions.worktreeConfigNguyễn Thái Ngọc Duy, Jan 16, 2019
  14. 10/10 submodule ensure-core-worktree: write to config.worktreeNguyễn Thái Ngọc Duy, Jan 16, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.