Skip to content

Per-worktree config file support

Nguyễn Thái Ngọc Duy git 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest4 patches 8 repliesIn review
  2. v44 patches 24 repliesSuperseded
  3. v36 patches 23 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v26 patches1 replySuperseded
v15 patches9 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4config: read per-worktree config filesDocumentation/config.txt Documentation/git-config.txt Documentation/git-worktree.txt +5 more+66 -30 replies
2/4config: --worktree for manipulating per-worktree config fileDocumentation/git-config.txt builtin/config.c+29 -81 reply
3/4config: automatically migrate to new config layout when --worktree is usedDocumentation/git-worktree.txt builtin/config.c worktree.c +1 more+54 -10 replies
4/4t2029: add tests for per-worktree configt/t2029-worktree-config.sh+82 -00 replies

Reviews trailers per patch

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

Read the v5 thread

Cover letter [PATCH v5 0/4] Per-worktree config file support

Let's get this rolling again. To refresh your memory because it's half a year since v4 [1], this is about letting each worktree in multi worktree setup has their own config settings. The most prominent ones are core.worktree, used by submodules, and core.sparseCheckout.

This time I'm not touching submodules at all. I'm leaving it in the good hands of "submodule people". All I'm providing is mechanism. How you use it is up to you. So the series benefits sparse checkout users only.

Not much has changed from v4, except that the migration to new config layout is done automatically _update_ a config variable with "git config --worktree".

I think this one is more or less ready. I have an RFC follow-up patch about core.bare, but that could be handled separately.

[1] http://public-inbox.org/git/[email protected]/

Nguyễn Thái Ngọc Duy (4):
config: read per-worktree config files
config: --worktree for manipulating per-worktree config file
config: automatically migrate to new config layout when --worktree is used
t2029: add tests for per-worktree config

 Documentation/config.txt               | 11 ++++-
 Documentation/git-config.txt           | 26 ++++++++---
 Documentation/git-worktree.txt         | 37 +++++++++++++++
 Documentation/gitrepository-layout.txt |  8 ++++
 builtin/config.c                       | 16 ++++++-
 cache.h                                |  2 +
 config.c                               |  7 +++
 environment.c                          |  1 +
 setup.c                                |  5 ++-
 t/t2029-worktree-config.sh (new +x)    | 82 ++++++++++++++++++++++++++++++++++
 worktree.c                             | 40 +++++++++++++++++
 worktree.h                             |  6 +++
 12 files changed, 230 insertions(+), 11 deletions(-)
 create mode 100755 t/t2029-worktree-config.sh
Signature · 1 line
2.8.2.524.g6ff3d78