From: Jonathan Tan <email@example.com>
To: Stefan Beller <firstname.lastname@example.org>
Cc: Junio C Hamano <email@example.com>, git <firstname.lastname@example.org>,
Christian Couder <email@example.com>,
Prathamesh Chavan <firstname.lastname@example.org>
Subject: Re: [PATCH 1/5] submodule foreach: correct '$path' in nested submodules from a subdirectory
Date: Fri, 4 May 2018 14:03:46 -0700 [thread overview]
Message-ID: <email@example.com> (raw)
On Thu, 3 May 2018 11:12:27 -0700
Stefan Beller <firstname.lastname@example.org> wrote:
> >> There are three different possible solutions that have more value:
> >> (a) The path value is documented as the path from the toplevel of the
> >> superproject to the mount point of the submodule. If 'the' refers to
> >> the superproject holding this submodule ('sub' holding 'nested'),
> >> the path would be expected to be path='nested'.
> > What is "the", and why is it quoted?
> because it is unclear what is emphasizes.
> It could be the intermediate (direct) superproject, or it
> could be the topmost superproject (where the command was run from).
> Just having "the", makes it unclear which of both it refers to.
Ah, I see - so s/'the'/'the superproject'/
> >> (b) In case 'the' superproject is referring to the toplevel, which
> >> is the superproject in which the original command was invoked,
> >> then path is expected to be path='sub/nested'.
And here, s/'the' superproject/'the superproject'/
> > Same comment about "the", and I think s/toplevel, which is the
> > superproject in which the original command was invoked/outermost
> > superproject/.
> The outermost superproject may not be the one you invoke the
> command in.
Good point. Maybe "the superproject the original command was run from",
but I'm open to a better name. So I would write the beginning as
<your first paragraph starting with "When running">
Also, in git-submodule.txt, $path is documented to be the "name of the
submodule directory relative to the superproject", but "the
superproject" is ambiguous.
To resolve both these issues, we could:
(a) Change "the superproject" to "its immediate superproject", so
$path would be "nested" instead of "../nested".
(b) Change "the superproject" to "the superproject the original
command was run from", so $path would be "sub/nested" instead of
(c) Change "the superproject" to "the directory the original command
was run from", so $path would be "../sub/nested" instead of
Going back to the original patch:
> The behavior for (c) was introduced in 091a6eb0fe (submodule: drop the
> top-level requirement, 2013-06-16) the intent for $path seemed to be
> relative to $cwd to the submodule worktree, but that did not work for
> nested submodules, as the intermittent submodules were not included in
> the path.
The (c) behavior was never really introduced, right? 091a6eb0fe
attempted to introduce (c), but it didn't work when --recursive was
next prev parent reply other threads:[~2018-05-04 21:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-03 0:53 [PATCH 0/5] Rebooting pc/submodule-helper-foreach Stefan Beller
2018-05-03 0:53 ` [PATCH 1/5] submodule foreach: correct '$path' in nested submodules from a subdirectory Stefan Beller
2018-05-03 13:29 ` Ramsay Jones
2018-05-03 17:47 ` Jonathan Tan
2018-05-03 18:12 ` Stefan Beller
2018-05-04 21:03 ` Jonathan Tan [this message]
2018-05-03 0:53 ` [PATCH 2/5] submodule foreach: document '$sm_path' instead of '$path' Stefan Beller
2018-05-03 17:50 ` Jonathan Tan
2018-05-03 0:53 ` [PATCH 3/5] submodule foreach: clarify the '$toplevel' variable documentation Stefan Beller
2018-05-03 17:51 ` Jonathan Tan
2018-05-03 0:53 ` [PATCH 4/5] submodule foreach: document variable '$displaypath' Stefan Beller
2018-05-03 0:53 ` [PATCH 5/5] submodule: port submodule subcommand 'foreach' from shell to C Stefan Beller
2018-05-03 1:06 ` Stefan Beller
2018-05-03 18:05 ` Jonathan Tan
2018-05-09 0:29 ` [PATCHv2 0/4] Rebooting pc/submodule-helper-foreach Stefan Beller
2018-05-09 0:29 ` [PATCH 1/4] submodule foreach: correct '$path' in nested submodules from a subdirectory Stefan Beller
2018-05-09 0:29 ` [PATCH 2/4] submodule foreach: document '$sm_path' instead of '$path' Stefan Beller
2018-05-09 0:29 ` [PATCH 3/4] submodule foreach: document variable '$displaypath' Stefan Beller
2018-05-09 0:29 ` [PATCH 4/4] submodule: port submodule subcommand 'foreach' from shell to C Stefan Beller
2018-05-10 6:37 ` Junio C Hamano
2018-05-10 21:25 ` [PATCH] " Stefan Beller
2018-05-09 17:13 ` [PATCHv2 0/4] Rebooting pc/submodule-helper-foreach Jonathan Tan
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:
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 \
* 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
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).