Re: [PATCH v4 1/3] fetch/pull: Add the --recurse-submodules option
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Nov 12, 2010, 19:54 UTC
- Message-ID
- <20101112195453.GA25248@burratino>
- In-Reply-To
- <4CDD391C.2000905@web.de>
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...
Show 25 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 &&?
Hope that helps. These are just tiny nitpicks; I am happy with the patch with or without them.
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) &&