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

Re: [PATCH/RFD 0/3] worktree.* config keys and submodule and multiple worktrees

From
Duy Nguyen <pclouds@gmail.com>
Date
Feb 9, 2015, 09:35 UTC
Message-ID
<CACsJy8D8Ur4W348t-WFUPrb7SQxmff5MJ4aRp+w+ZiQ7VVvipg@mail.gmail.com>
In-Reply-To
<54D79EAB.6060301@web.de>
On Mon, Feb 9, 2015 at 12:36 AM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
Show 6 quoted lines
> I wonder if it's worth all the hassle to invent new names. Wouldn't
> it be much better to just keep a list of per-worktree configuration
> value names and use that inside the config code to decide where to
> find them for multiple work trees. That would also work easily for
> stuff like EOL-config and would push the complexity in the config
> machinery and not onto the user.

It's certainly possible to relocate core.worktree to outside $GIT_DIR/config. But I don't think it helps. If anything it'll make it harder to distinguish the old setup and the new one. I think we need a clear signal that will make old git barf on new setup, to be safe. Maybe stepping core.repositoryformatversion, or breaking .git file format when we switch to the new setup (with $GIT_COMMON_DIR).

Or.. perhaps we could use the old setup for "primary" worktree and the new one for secondary worktrees of the same submodule. In these secondary submodules, $GIT_COMMON_DIR is enough to make old git reject them. And we could just reuse core.worktree, if we can make core.worktree in $GIT_DIR/config.worktree shadow one in $GIT_DIR/config..

Need to study git-submodule.sh some more..
-- 
Duy
Previous: Jens LehmannNext: Max Kirillov
Message 7 of 22 in “worktree.* config keys and submodule and multiple worktrees”
  1. 0/3 worktree.* config keys and submodule and multiple worktreesNguyễn Thái Ngọc Duy, Feb 8, 2015
  2. 1/3 config.c: new config namespace worktree.* stored in $GIT_DIR/config.worktreeNguyễn Thái Ngọc Duy, Feb 8, 2015
  3. 2/3 setup: add worktree.path to shadow core.worktreeNguyễn Thái Ngọc Duy, Feb 8, 2015
  4. 3/3 submodule: use worktree.path instead of core.worktreeNguyễn Thái Ngọc Duy, Feb 8, 2015
  5. Jens LehmannFeb 8, 2015
  6. Jens LehmannFeb 8, 2015
  7. Duy NguyenFeb 9, 2015
  8. per-repository and per-worktree config variablesMax Kirillov, Mar 18, 2015
  9. Duy NguyenMar 24, 2015
  10. config.c: split some variables to $GIT_DIR/config.worktreeNguyễn Thái Ngọc Duy, Mar 26, 2015
  11. Max KirillovMar 26, 2015
  12. Duy NguyenMar 29, 2015
  13. Max KirillovMar 30, 2015
  14. config.c: split some variables to $GIT_DIR/config.worktreeNguyễn Thái Ngọc Duy, Mar 31, 2015
  15. Duy NguyenMar 31, 2015
  16. Max KirillovApr 1, 2015
  17. Duy NguyenApr 3, 2015
  18. Max KirillovApr 13, 2015
  19. Duy NguyenApr 18, 2015
  20. Max KirillovApr 20, 2015
  21. Duy NguyenApr 20, 2015
  22. Jens LehmannMar 25, 2015

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.