* [PATCH] Documentation/submodule: Fix submodule.<name> -> .<path> typos
@ 2014-03-27 21:06 W. Trevor King
2014-03-27 23:15 ` Jens Lehmann
0 siblings, 1 reply; 5+ messages in thread
From: W. Trevor King @ 2014-03-27 21:06 UTC (permalink / raw)
To: Git
Cc: Junio C Hamano, Heiko Voigt, Jens Lehmann, Johan Herland,
W. Trevor King
The transition from submodule.<path>.* to submodule.<name>.* happened
in 73b0898d (Teach "git submodule add" the --name option, 2012-09-30),
which landed in v1.8.1-rc0 on 2012-12-03. The first
submodule.<path>.branch reference landed a short time later in
b9289227 (submodule add: If --branch is given, record it in
.gitmodules, 2012-12-19), and I was probably just not aware of
73b0898d. The second submodule.<path>.branch reference landed in
23d25e48 (submodule: explicit local branch creation in module_clone,
2014-01-26), and is just a copy paste error. This commit updates both
references to the current submodule.<name>.branch.
Reported-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: W. Trevor King <wking@tremily.us>
---
This patch is against master, because 23d25e48 hasn't landed in maint
yet. If you want, I can split this into two patches, one against
maint fixing the b9289227 typo and another against master fixing the
23d25e48 typo.
Documentation/git-submodule.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index 46c1eeb..77588b0 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -162,7 +162,7 @@ update::
+
For updates that clone missing submodules, checkout-mode updates will
create submodules with detached HEADs; all other modes will create
-submodules with a local branch named after `submodule.<path>.branch`.
+submodules with a local branch named after `submodule.<name>.branch`.
+
For updates that do not clone missing submodules, the submodule's HEAD
is only touched when the remote reference does not match the
@@ -247,7 +247,7 @@ OPTIONS
-b::
--branch::
Branch of repository to add as submodule.
- The name of the branch is recorded as `submodule.<path>.branch` in
+ The name of the branch is recorded as `submodule.<name>.branch` in
`.gitmodules` for `update --remote`.
-f::
--
1.9.1.352.gd393d14.dirty
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Documentation/submodule: Fix submodule.<name> -> .<path> typos
2014-03-27 21:06 [PATCH] Documentation/submodule: Fix submodule.<name> -> .<path> typos W. Trevor King
@ 2014-03-27 23:15 ` Jens Lehmann
2014-03-28 2:06 ` W. Trevor King
0 siblings, 1 reply; 5+ messages in thread
From: Jens Lehmann @ 2014-03-27 23:15 UTC (permalink / raw)
To: W. Trevor King, Git; +Cc: Junio C Hamano, Heiko Voigt, Johan Herland
Am 27.03.2014 22:06, schrieb W. Trevor King:
> The transition from submodule.<path>.* to submodule.<name>.* happened
> in 73b0898d (Teach "git submodule add" the --name option, 2012-09-30),
> which landed in v1.8.1-rc0 on 2012-12-03.
Nope, the distinction between path and name is way older (AFAIK it
is there from day one). That was just the point in time where you
could choose a different name without editing .gitmodules. And the
fact that the name is initialized with the path confused a lot of
people.
> The first
> submodule.<path>.branch reference landed a short time later in
> b9289227 (submodule add: If --branch is given, record it in
> .gitmodules, 2012-12-19), and I was probably just not aware of
> 73b0898d. The second submodule.<path>.branch reference landed in
> 23d25e48 (submodule: explicit local branch creation in module_clone,
> 2014-01-26), and is just a copy paste error. This commit updates both
> references to the current submodule.<name>.branch.
>
> Reported-by: Junio C Hamano <gitster@pobox.com>
> Signed-off-by: W. Trevor King <wking@tremily.us>
> ---
> This patch is against master, because 23d25e48 hasn't landed in maint
> yet. If you want, I can split this into two patches, one against
> maint fixing the b9289227 typo and another against master fixing the
> 23d25e48 typo.
This fixes the only two usages of 'submodule.<path>.*' in the
Documentation I can see in current master.
> Documentation/git-submodule.txt | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
> index 46c1eeb..77588b0 100644
> --- a/Documentation/git-submodule.txt
> +++ b/Documentation/git-submodule.txt
> @@ -162,7 +162,7 @@ update::
> +
> For updates that clone missing submodules, checkout-mode updates will
> create submodules with detached HEADs; all other modes will create
> -submodules with a local branch named after `submodule.<path>.branch`.
> +submodules with a local branch named after `submodule.<name>.branch`.
> +
> For updates that do not clone missing submodules, the submodule's HEAD
> is only touched when the remote reference does not match the
> @@ -247,7 +247,7 @@ OPTIONS
> -b::
> --branch::
> Branch of repository to add as submodule.
> - The name of the branch is recorded as `submodule.<path>.branch` in
> + The name of the branch is recorded as `submodule.<name>.branch` in
> `.gitmodules` for `update --remote`.
>
> -f::
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Documentation/submodule: Fix submodule.<name> -> .<path> typos
2014-03-27 23:15 ` Jens Lehmann
@ 2014-03-28 2:06 ` W. Trevor King
2014-03-28 16:55 ` Jens Lehmann
0 siblings, 1 reply; 5+ messages in thread
From: W. Trevor King @ 2014-03-28 2:06 UTC (permalink / raw)
To: Jens Lehmann; +Cc: Git, Junio C Hamano, Heiko Voigt, Johan Herland
[-- Attachment #1: Type: text/plain, Size: 2220 bytes --]
On Fri, Mar 28, 2014 at 12:15:00AM +0100, Jens Lehmann wrote:
> Am 27.03.2014 22:06, schrieb W. Trevor King:
> > The transition from submodule.<path>.* to submodule.<name>.* happened
> > in 73b0898d (Teach "git submodule add" the --name option, 2012-09-30),
> > which landed in v1.8.1-rc0 on 2012-12-03.
>
> Nope, the distinction between path and name is way older (AFAIK it
> is there from day one). That was just the point in time where you
> could choose a different name without editing .gitmodules. And the
> fact that the name is initialized with the path confused a lot of
> people.
Before 73b0898d, cmd_add used:
git config -f .gitmodules submodule."$sm_path".path "$sm_path"
and similar, so I used submodule.<path>.branch in my initial
documentation of this patch (v5 of that series) [1]. By the final v8
(which rebased onto the then-current master with 73b0898d), the
surrounding calls were [2]:
git config -f .gitmodules submodule."$sm_name".path "$sm_path"
but I missed the update to <name> in my rebasing. I suppose I could
have used <name> instead of <path> in my initial v5 patch, but I was
one of the folks confused by the old name == path behavior ;).
> > This patch is against master, because 23d25e48 hasn't landed in maint
> > yet. If you want, I can split this into two patches, one against
> > maint fixing the b9289227 typo and another against master fixing the
> > 23d25e48 typo.
>
> This fixes the only two usages of 'submodule.<path>.*' in the
> Documentation I can see in current master.
Right. However, this patch won't apply to the maint branch (where
23d25e48 hasn't landed). I'm just saying that we may want to split
this patch in half and push the fix for b9289227 in a maintenance
release. On the other hand, we've survived since 2012 with the
current docs, so *not* splitting this patch apart works for me too.
Cheers,
Trevor
[1]: http://article.gmane.org/gmane.comp.version-control.git/210763
[2]: http://article.gmane.org/gmane.comp.version-control.git/211832
--
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Documentation/submodule: Fix submodule.<name> -> .<path> typos
2014-03-28 2:06 ` W. Trevor King
@ 2014-03-28 16:55 ` Jens Lehmann
2014-03-28 17:01 ` W. Trevor King
0 siblings, 1 reply; 5+ messages in thread
From: Jens Lehmann @ 2014-03-28 16:55 UTC (permalink / raw)
To: W. Trevor King; +Cc: Git, Junio C Hamano, Heiko Voigt, Johan Herland
I just noticed that the two patches Junio added to pu have a reworded
commit message I'm perfectly happy with.
Thanks all.
Am 28.03.2014 03:06, schrieb W. Trevor King:
> On Fri, Mar 28, 2014 at 12:15:00AM +0100, Jens Lehmann wrote:
>> Am 27.03.2014 22:06, schrieb W. Trevor King:
>>> The transition from submodule.<path>.* to submodule.<name>.* happened
>>> in 73b0898d (Teach "git submodule add" the --name option, 2012-09-30),
>>> which landed in v1.8.1-rc0 on 2012-12-03.
>>
>> Nope, the distinction between path and name is way older (AFAIK it
>> is there from day one). That was just the point in time where you
>> could choose a different name without editing .gitmodules. And the
>> fact that the name is initialized with the path confused a lot of
>> people.
>
> Before 73b0898d, cmd_add used:
>
> git config -f .gitmodules submodule."$sm_path".path "$sm_path"
>
> and similar, so I used submodule.<path>.branch in my initial
> documentation of this patch (v5 of that series) [1]. By the final v8
> (which rebased onto the then-current master with 73b0898d), the
> surrounding calls were [2]:
>
> git config -f .gitmodules submodule."$sm_name".path "$sm_path"
>
> but I missed the update to <name> in my rebasing. I suppose I could
> have used <name> instead of <path> in my initial v5 patch, but I was
> one of the folks confused by the old name == path behavior ;).
>
>>> This patch is against master, because 23d25e48 hasn't landed in maint
>>> yet. If you want, I can split this into two patches, one against
>>> maint fixing the b9289227 typo and another against master fixing the
>>> 23d25e48 typo.
>>
>> This fixes the only two usages of 'submodule.<path>.*' in the
>> Documentation I can see in current master.
>
> Right. However, this patch won't apply to the maint branch (where
> 23d25e48 hasn't landed). I'm just saying that we may want to split
> this patch in half and push the fix for b9289227 in a maintenance
> release. On the other hand, we've survived since 2012 with the
> current docs, so *not* splitting this patch apart works for me too.
>
> Cheers,
> Trevor
>
> [1]: http://article.gmane.org/gmane.comp.version-control.git/210763
> [2]: http://article.gmane.org/gmane.comp.version-control.git/211832
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Documentation/submodule: Fix submodule.<name> -> .<path> typos
2014-03-28 16:55 ` Jens Lehmann
@ 2014-03-28 17:01 ` W. Trevor King
0 siblings, 0 replies; 5+ messages in thread
From: W. Trevor King @ 2014-03-28 17:01 UTC (permalink / raw)
To: Jens Lehmann; +Cc: Git, Junio C Hamano, Heiko Voigt, Johan Herland
[-- Attachment #1: Type: text/plain, Size: 397 bytes --]
On Fri, Mar 28, 2014 at 05:55:18PM +0100, Jens Lehmann wrote:
> I just noticed that the two patches Junio added to pu have a
> reworded commit message I'm perfectly happy with.
The revised wording works for me too.
Cheers,
Trevor
--
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-03-28 17:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-27 21:06 [PATCH] Documentation/submodule: Fix submodule.<name> -> .<path> typos W. Trevor King
2014-03-27 23:15 ` Jens Lehmann
2014-03-28 2:06 ` W. Trevor King
2014-03-28 16:55 ` Jens Lehmann
2014-03-28 17:01 ` W. Trevor King
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 NNTP newsgroup(s).