]> git.ipfire.org Git - thirdparty/git.git/commit - git-submodule.sh
submodule--helper update-clone: learn --init
authorGlen Choo <chooglen@google.com>
Sat, 5 Mar 2022 00:13:58 +0000 (16:13 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sat, 5 Mar 2022 00:39:12 +0000 (16:39 -0800)
commit29a5e9e1ffeadb0555fdd2f366f1cb7259462ab9
treea1659580fda9d81e217e5ce054dd24a01e5f4e42
parent3ce52cba5b283af1f5dbebfe43aeea5d3421dac6
submodule--helper update-clone: learn --init

Teach "git submodule--helper update-clone" the --init flag and remove
the corresponding shell code.

When the `--init` flag is passed to the subcommand, we do not spawn a
new subprocess and call `submodule--helper init` on the submodule paths,
because the Git machinery is not able to pick up the configuration
changes introduced by that init call. So we instead run the
`init_submodule_cb()` callback over each submodule in the same process.

[1] https://lore.kernel.org/git/CAP8UFD0NCQ5w_3GtT_xHr35i7h8BuLX4UcHNY6VHPGREmDVObA@mail.gmail.com/

Signed-off-by: Glen Choo <chooglen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/submodule--helper.c
git-submodule.sh