Re: [PATCH v4 1/3] fetch/pull: Add the --recurse-submodules option
- From
Jens Lehmann <jens.lehmann@web.de>
- Date
- Nov 12, 2010, 20:22 UTC
- Message-ID
- <4CDDA1F5.4090504@web.de>
- In-Reply-To
- <20101112195453.GA25248@burratino>
Am 12.11.2010 20:54, schrieb Jonathan Nieder:
Show 9 quoted lines
> Jens Lehmann wrote: > >> Ok, here is the updated version of patch 1/3 making "--submodule-prefix" a >> hidden option which is not documented in Documentation/fetch-options.txt . > > Oh, I missed that you were proposing leaving it undocumented. On one hand, > it is nice when debugging if all options are documented; but on the other > hand, there is precedent in --rebasing for hiding implementation details > like this. Unlike -h output, the manual is not so space-constrainted, so...
Whoops, my question was about hiding the option and so I have been a bit overeager to remove the documentation too ...
Show 27 quoted lines
>> --- /dev/null
>> +++ b/t/t5526-fetch-submodules.sh
>> @@ -0,0 +1,109 @@
>> +#!/bin/sh
>> +# Copyright (c) 2010, Jens Lehmann
>> +
>> +test_description='Recursive "git fetch" for submodules'
>> +
>> +. ./test-lib.sh
>> +
>> +pwd=$(pwd)
>> +
>> +add_upstream_commit() {
>> + (
>> + cd submodule &&
>> + head1=$(git rev-parse --short HEAD) &&
>> + echo new >> subfile &&
>> + test_tick &&
>> + git add subfile &&
>> + git commit -m new subfile &&
>> + head2=$(git rev-parse --short HEAD) &&
>> + echo "From $pwd/submodule" > ../expect.err &&
>> + echo " $head1..$head2 master -> origin/master" >> ../expect.err
>> + )
>> + (
>
> Missing &&?Good eyes!
> Hope that helps. These are just tiny nitpicks; I am happy with the patch > with or without them.
Thanks!
Junio, do you want me to send an updated version of this patch or are you ok with squashing this in?
Show 32 quoted lines
> diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
> index 594f7ce..a9cb8ab 100644
> --- a/Documentation/fetch-options.txt
> +++ b/Documentation/fetch-options.txt
> @@ -67,6 +67,13 @@ endif::git-pull[]
> --recurse-submodules::
> Use this option to fetch new commits of all populated submodules too.
>
> +ifndef::git-pull[]
> +--submodule-prefix=<path>::
> + Prepend <path> to paths printed in informative messages
> + such as "Fetching submodule foo". This option is used
> + internally when recursing over submodules.
> +endif::git-pull[]
> +
> -u::
> --update-head-ok::
> By default 'git fetch' refuses to update the head which
> diff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh
> index 107317a..9c1d3a0 100755
> --- a/t/t5526-fetch-submodules.sh
> +++ b/t/t5526-fetch-submodules.sh
> @@ -18,7 +18,7 @@ add_upstream_commit() {
> head2=$(git rev-parse --short HEAD) &&
> echo "From $pwd/submodule" > ../expect.err &&
> echo " $head1..$head2 master -> origin/master" >> ../expect.err
> - )
> + ) &&
> (
> cd deepsubmodule &&
> head1=$(git rev-parse --short HEAD) &&
>