<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-submodule.sh, branch v2.41.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.41.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.41.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-12-28T03:06:17Z</updated>
<entry>
<title>Merge branch 'ss/pull-v-recurse-fix'</title>
<updated>2022-12-28T03:06:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-12-28T03:06:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b3b9e5c1718e59d2a835291bbc9c28b1762c45ce'/>
<id>urn:sha1:b3b9e5c1718e59d2a835291bbc9c28b1762c45ce</id>
<content type='text'>
"git pull -v --recurse-submodules" attempted to pass "-v" down to
underlying "git submodule update", which did not understand the
request and barfed, which has been corrected.

* ss/pull-v-recurse-fix:
  submodule: accept -v for the update command
</content>
</entry>
<entry>
<title>submodule: accept -v for the update command</title>
<updated>2022-12-18T01:28:30Z</updated>
<author>
<name>Sven Strickroth</name>
<email>email@cs-ware.de</email>
</author>
<published>2022-12-10T13:06:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6f65f847664445b347810bece6eee84c2f39f4ef'/>
<id>urn:sha1:6f65f847664445b347810bece6eee84c2f39f4ef</id>
<content type='text'>
Since a56771a6 (builtin/pull: respect verbosity settings in
submodules, 2018-01-25), "git pull -v --recurse-submodules"
propagates the "-v" to the submodule command, but because the
latter command does not understand the option, it barfs.

Teach "git submodule update" to accept the option to fix it.

Signed-off-by: Sven Strickroth &lt;email@cs-ware.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule--helper: drop "update --prefix &lt;pfx&gt;" for "-C &lt;pfx&gt; update"</title>
<updated>2022-11-08T19:55:30Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-11-08T14:10:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1b6e2001c7fd96214b1fe2f910fad5cbb60b607a'/>
<id>urn:sha1:1b6e2001c7fd96214b1fe2f910fad5cbb60b607a</id>
<content type='text'>
Since 29a5e9e1ffe (submodule--helper update-clone: learn --init,
2022-03-04) we've been passing "-C &lt;prefix&gt;" from "git-submodule.sh"
whenever we pass "--prefix &lt;prefix&gt;", so the latter is redundant to
the former. Let's drop the "--prefix" option.

Suggested-by: Glen Choo &lt;chooglen@google.com&gt;
Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
</content>
</entry>
<entry>
<title>submodule--helper: remove --prefix from "absorbgitdirs"</title>
<updated>2022-11-08T19:55:30Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-11-08T14:10:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=64f48ad1f036be2a09273051b28bfacf471cbfcc'/>
<id>urn:sha1:64f48ad1f036be2a09273051b28bfacf471cbfcc</id>
<content type='text'>
Let's pass the "-C &lt;prefix&gt;" option instead to "absorbgitdirs" from
its only caller.

When it was added in f6f85861400 (submodule: add absorb-git-dir
function, 2016-12-12) there were other "submodule--helper" subcommands
that were invoked with "-C &lt;prefix&gt;", so we could have done this all
along.

Suggested-by: Glen Choo &lt;chooglen@google.com&gt;
Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
</content>
</entry>
<entry>
<title>git-submodule.sh: use "$quiet", not "$GIT_QUIET"</title>
<updated>2022-06-28T20:13:18Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-06-28T10:05:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2eec463739745d2110aa5462ba9547fa8d255ebb'/>
<id>urn:sha1:2eec463739745d2110aa5462ba9547fa8d255ebb</id>
<content type='text'>
Remove the use of the "$GIT_QUIET" variable in favor of our own
"$quiet", ever since b3c5f5cb048 (submodule: move core cmd_update()
logic to C, 2022-03-15) we have not used the "say" function in
git-sh-setup.sh, which is the only thing that's affected by using
"GIT_QUIET".

We still want to support --quiet for our own use though, but let's use
our own variable for that. Now it's obvious that we only care about
passing "--quiet" to "git submodule--helper", and not to change the
output of any "say" invocation.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule--helper: understand --checkout, --merge and --rebase synonyms</title>
<updated>2022-06-28T20:13:17Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-06-28T10:05:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8f12108c2951cdfa181d6be66b6def28cd007bdd'/>
<id>urn:sha1:8f12108c2951cdfa181d6be66b6def28cd007bdd</id>
<content type='text'>
Understand --checkout, --merge and --rebase synonyms for
--update={checkout,merge,rebase}, as well as the short options that
'git submodule' itself understands.

This removes a difference between the CLI API of "git submodule" and
"git submodule--helper", making it easier to make the latter an alias
for the former. See 48308681b07 (git submodule update: have a
dedicated helper for cloning, 2016-02-29) for the initial addition of
--update.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule--helper: rename "absorb-git-dirs" to "absorbgitdirs"</title>
<updated>2022-06-28T20:13:17Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-06-28T10:05:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6e556c412e9283cfa9f9be4bfe4e9c813a53bf52'/>
<id>urn:sha1:6e556c412e9283cfa9f9be4bfe4e9c813a53bf52</id>
<content type='text'>
Rename the "absorb-git-dirs" subcommand to "absorbgitdirs", which is
what the "git submodule" command itself has called it since the
subcommand was implemented in f6f85861400 (submodule: add
absorb-git-dir function, 2016-12-12).

Having these two be different will make it more tedious to dispatch to
eventually dispatch "git submodule--helper" directly, as we'd need to
retain this name mapping. So let's get rid of this needless
inconsistency.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule update: remove "-v" option</title>
<updated>2022-06-28T20:13:17Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-06-28T10:05:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0d68ee723e54330138450f29e358e5ebe1a47aa0'/>
<id>urn:sha1:0d68ee723e54330138450f29e358e5ebe1a47aa0</id>
<content type='text'>
In e84c3cf3dc3 (git-submodule.sh: accept verbose flag in cmd_update to
be non-quiet, 2018-08-14) the "git submodule update" sub-command was
made to understand "-v", but the option was never documented.

The only in-tree user has been this test added in
3ad0401e9e6 (submodule update: silence underlying merge/rebase with
"--quiet", 2020-09-30), it wasn't per-se testing --quiet, but fixing a
bug in e84c3cf3dc3: It used to set "GIT_QUIET=0" instead of unsetting
it on "-v", and thus we'd end up passing "--quiet" to "git
submodule--helper" on "-v", since the "--quiet" option was passed
using the ${parameter:+word} construct.

Furthermore, even if someone had used the "-v" option they'd only be
getting the default output. Our default in both git-submodule.sh and
"git submodule--helper" has been to be "verbose", so the only way this
option could have matter is if it were used as e.g.:

    git submodule --quiet update -v [...]

I.e. to undo the effect of a previous "--quiet" on the command-line.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>submodule--helper: have --require-init imply --init</title>
<updated>2022-06-28T20:13:17Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-06-28T10:05:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d9c7f69aaa6b001949e9d2b693c22c595cc9d0d6'/>
<id>urn:sha1:d9c7f69aaa6b001949e9d2b693c22c595cc9d0d6</id>
<content type='text'>
Adjust code added in 0060fd1511b (clone --recurse-submodules: prevent
name squatting on Windows, 2019-09-12) to have the internal
--require-init option imply --init, rather than having
"git-submodule.sh" add it implicitly.

This change doesn't make any difference now, but eliminates another
special-case where "git submodule--helper update"'s behavior was
different from "git submodule update". This will make it easier to
eventually replace the cmd_update() function in git-submodule.sh.

We'll still need to keep the distinction between "--init" and
"--require-init" in git-submodule.sh. Once cmd_update() gets
re-implemented in C we'll be able to change variables and other code
related to that, but not yet.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-submodule.sh: remove unused top-level "--branch" argument</title>
<updated>2022-06-28T20:13:17Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-06-28T10:05:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=da3aae9e8476af3b23363d39dba86b679c14a498'/>
<id>urn:sha1:da3aae9e8476af3b23363d39dba86b679c14a498</id>
<content type='text'>
In 5c08dbbdf1a (git-submodule: fix subcommand parser, 2008-01-15) the
"--branch" option was supported as an option to "git submodule"
itself, i.e. "git submodule --branch" as a side-effect of its
implementation.

Then in b57e8119e6e (submodule: teach set-branch subcommand,
2019-02-08) when the "set-branch" subcommand was added the assertion
that we shouldn't have "--branch" anywhere except as an argument to
"add" and "set-branch" was copy/pasted from the adjacent check for
"--cache" added (or rather modified) in 496eeeb19b9 (git-submodule.sh:
avoid "test &lt;cond&gt; -a/-o &lt;cond&gt;", 2014-06-10).

But there's been a logic error in that check, which at a glance looked
like it should be supporting:

    git submodule --branch &lt;branch&gt; (add | set-branch) [&lt;options&gt;]

But due to "||" in the condition (as opposed to "&amp;&amp;" for "--cache") if
we have "--branch" here already we'll emit usage, even for "add" and
"set-branch".

So in addition to never having documented this form, it hasn't worked
since b57e8119e6e was released with v2.22.0.

So it's safe to remove this code. I.e. we don't want to support the
form noted above, but only:

    git submodule (add | set-branch) --branch &lt;branch&gt; [&lt;options&gt;]

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
