]> git.ipfire.org Git - thirdparty/git.git/commit
submodule--helper: have --require-init imply --init
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 28 Jun 2022 10:05:27 +0000 (12:05 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 Jun 2022 20:13:17 +0000 (13:13 -0700)
commitd9c7f69aaa6b001949e9d2b693c22c595cc9d0d6
tree7991e7bc59efb9f8e87a9c093813852d0ad2f289
parentda3aae9e8476af3b23363d39dba86b679c14a498
submodule--helper: have --require-init imply --init

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 <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/submodule--helper.c
git-submodule.sh