]> git.ipfire.org Git - thirdparty/git.git/commit
submodule--helper: eliminate internal "--update" option
authorGlen Choo <chooglen@google.com>
Tue, 28 Jun 2022 10:05:32 +0000 (12:05 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 Jun 2022 20:13:18 +0000 (13:13 -0700)
commitb788fc671bf1862a72f9fe7256affd7d152b8a6f
tree65ee7919827e617e9c156acb85b1354b6049daab
parent8f12108c2951cdfa181d6be66b6def28cd007bdd
submodule--helper: eliminate internal "--update" option

Follow-up on the preceding commit which taught "git submodule--helper
update" to understand "--merge", "--checkout" and "--rebase" and use
those options instead of "--update=(rebase|merge|checkout|none)" when
the command invokes itself.

Unlike the preceding change this isn't strictly necessary to
eventually change "git-submodule.sh" so that it invokes "git
submodule--helper update" directly, but let's remove this
inconsistency in the command-line interface. We shouldn't need to
carry special synonyms for existing options in "git submodule--helper"
when that command can use the primary documented names instead.

But, as seen in the post-image this makes the control flow within
"builtin/submodule--helper.c" simpler, we can now write directly to
the "update_default" member of "struct update_data" when parsing the
options in "module_update()".

Signed-off-by: Glen Choo <chooglen@google.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/submodule--helper.c