Re: [PATCH v4 1/3] fetch/pull: Add the --recurse-submodules option
From: Jens Lehmann <hidden>
Date: 2016-06-15 22:50:02
Am 12.11.2010 20:54, schrieb Jonathan Nieder:
Jens Lehmann wrote:quoted
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 ...
quoted
--- /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?
quoted hunk ↗ jump to hunk
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 whichdiff --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) &&