From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH 0/6] Add "git config --move-to"
Date: Thu, 27 Dec 2018 16:56:05 +0100 [thread overview]
Message-ID: <20181227155611.10585-1-pclouds@gmail.com> (raw)
This is a continuation of nd/per-worktree-config, fixing is small
things from that series and prepares to make submodules work in
multiple worktrees.
The first thing is adding API for updating per-worktree config in
03/06. When submodule code wants to write to a per-worktree config,
calling this function takes care of both single and multi worktree
setups, similar to "git config --worktree <name> <value>"
The second thing is "git config --move-to" and friends. This helps
the config transition right after enabling extensions.worktreeConfig,
when the user has to make sure per-worktree config stays in
per-worktree file.
Manual moving config from one file to another is possible with a
couple keys like core.worktree, but once you have to move multiple
groups (i.e. "submodule.*.*" keys) then it becomes a lot less fun and
more pain. This simplifies that work (and also migration
documentation)
Note that I added --move-glob-to because I think glob fits much better
than regex for matching keys because of the dots in config keys. I
added --move-regex-to anyway because we have --get-regexp. Maybe I
should add --get-glob too (but probably not now).
There is also a NEEDSWORK in 03/06. But I hope it could be addressed
after this series is merged (so that I could continue pushing
submodule changes out)
Nguyễn Thái Ngọc Duy (6):
config.c: avoid git_path() in do_git_config_sequence()
worktree.c: add get_worktree_config()
config.c: add repo_config_set_worktree_gently()
config: use OPT_FILENAME()
config: factor out set_config_source_file()
config: add --move-to
Documentation/git-config.txt | 12 ++
Documentation/git-worktree.txt | 16 ++-
builtin/config.c | 244 ++++++++++++++++++++++++---------
config.c | 55 +++++++-
config.h | 3 +
t/t1300-config.sh | 54 ++++++++
worktree.c | 16 +++
worktree.h | 7 +
8 files changed, 330 insertions(+), 77 deletions(-)
--
2.20.0.482.g66447595a7
next reply other threads:[~2018-12-27 15:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-27 15:56 Nguyễn Thái Ngọc Duy [this message]
2018-12-27 15:56 ` [PATCH 1/6] config.c: avoid git_path() in do_git_config_sequence() Nguyễn Thái Ngọc Duy
2019-01-10 21:38 ` Junio C Hamano
2018-12-27 15:56 ` [PATCH 2/6] worktree.c: add get_worktree_config() Nguyễn Thái Ngọc Duy
2018-12-27 20:36 ` Eric Sunshine
2018-12-27 15:56 ` [PATCH 3/6] config.c: add repo_config_set_worktree_gently() Nguyễn Thái Ngọc Duy
2019-04-30 16:40 ` Derrick Stolee
2019-05-01 9:55 ` Duy Nguyen
2018-12-27 15:56 ` [PATCH 4/6] config: use OPT_FILENAME() Nguyễn Thái Ngọc Duy
2018-12-27 20:40 ` Eric Sunshine
2018-12-27 15:56 ` [PATCH 5/6] config: factor out set_config_source_file() Nguyễn Thái Ngọc Duy
2018-12-27 15:56 ` [PATCH 6/6] config: add --move-to Nguyễn Thái Ngọc Duy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181227155611.10585-1-pclouds@gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).