From: Junio C Hamano <gitster@pobox.com>
To: Yoichi NAKAYAMA <yoichi.nakayama@gmail.com>
Cc: Yoichi NAKAYAMA via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH v2 1/3] submodule: make submodule.<name>.gitdir relative for worktrees
Date: Thu, 26 Nov 2026 21:23:53 -0800 [thread overview]
Message-ID: <xmqqik1ietjq.fsf@gitster.g> (raw)
In-Reply-To: <CAF5D8-ve1dtYWUMDeiYYa0FpDOv3c=V4MAS49Awy4e-9iZy-xA@mail.gmail.com> (Yoichi NAKAYAMA's message of "Fri, 27 Nov 2026 14:04:01 +0900")
Yoichi NAKAYAMA <yoichi.nakayama@gmail.com> writes:
> I'll update the commit message body as follows:
>
> Currently, repo_git_path_append() can produce an absolute path
> even when worktree.useRelativePaths is enabled, such as when
> running in a linked worktree or when GIT_DIR is set to an
> absolute path. As a result, `submodule.<name>.gitdir` can be
> stored as an absolute path.
>
> Always store `submodule.<name>.gitdir` as a relative path to ensure
> that it continues to work when the worktree is moved along with the
> main worktree. (This benefit also requires worktree.useRelativePaths
> to be set to true.)
"Always store"?
I am not a heavy user of submodule & secondary worktree user, but if
worktree.useRelativePaths configuration exists, should relativifying the
gitdir still be done unconditionally, or should it be done only when the
configuration variable is set to true?
Thanks.
next prev parent reply other threads:[~2026-11-27 5:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 12:03 [PATCH 0/3] submodule: support worktree-specific configuration Yoichi NAKAYAMA via GitGitGadget
2026-11-12 12:03 ` [PATCH 1/3] submodule: make submodule.<name>.gitdir relative for worktrees Yoichi NAKAYAMA via GitGitGadget
2026-11-14 15:27 ` Yoichi NAKAYAMA
2026-11-14 15:47 ` Yoichi NAKAYAMA
2026-11-12 12:03 ` [PATCH 2/3] submodule: store settings in worktree config when enabled Yoichi NAKAYAMA via GitGitGadget
2026-11-12 12:03 ` [PATCH 3/3] submodule init: copy submodule.<name>.gitdir to config.worktree Yoichi NAKAYAMA via GitGitGadget
2026-11-21 15:10 ` [PATCH v2 0/3] submodule: support worktree-specific configuration Yoichi NAKAYAMA via GitGitGadget
2026-11-21 15:10 ` [PATCH v2 1/3] submodule: make submodule.<name>.gitdir relative for worktrees Yoichi NAKAYAMA via GitGitGadget
2026-11-24 19:44 ` Junio C Hamano
2026-11-27 5:04 ` Yoichi NAKAYAMA
2026-11-27 5:23 ` Junio C Hamano [this message]
2026-11-27 6:15 ` Yoichi NAKAYAMA
2026-11-21 15:10 ` [PATCH v2 2/3] submodule: store settings in worktree config when enabled Yoichi NAKAYAMA via GitGitGadget
2026-11-24 20:14 ` Junio C Hamano
2026-11-27 12:35 ` Yoichi NAKAYAMA
2026-11-21 15:10 ` [PATCH v2 3/3] submodule init: copy submodule.<name>.gitdir to config.worktree Yoichi NAKAYAMA via GitGitGadget
2026-11-24 20:44 ` Junio C Hamano
2026-11-28 0:14 ` Yoichi NAKAYAMA
2026-11-28 22:05 ` [PATCH v3 0/4] submodule: support worktree-specific configuration Yoichi NAKAYAMA via GitGitGadget
2026-11-28 22:05 ` [PATCH v3 1/4] submodule init: make submodule.<name>.gitdir relative for worktrees Yoichi NAKAYAMA via GitGitGadget
2026-11-28 22:05 ` [PATCH v3 2/4] submodule init: resolve symlinks in submodule.<name>.gitdir Yoichi NAKAYAMA via GitGitGadget
2026-11-28 22:05 ` [PATCH v3 3/4] submodule: store settings in worktree config when enabled Yoichi NAKAYAMA via GitGitGadget
2026-11-28 22:05 ` [PATCH v3 4/4] submodule init: copy submodule.<name>.gitdir to config.worktree Yoichi NAKAYAMA via GitGitGadget
2026-11-29 8:32 ` Junio C Hamano
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqik1ietjq.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=yoichi.nakayama@gmail.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox