summaryrefslogtreecommitdiffstats
path: root/builtin/submodule--helper.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-09-01 01:18:03 +0200
committerJunio C Hamano <gitster@pobox.com>2022-09-02 18:16:24 +0200
commit96a907376b10c42879dafc7f6b4842f8dbc04597 (patch)
treebddce0e651bd87aad1760cf74bfe340becd293d9 /builtin/submodule--helper.c
parentsubmodule--helper: return "ret", not "1" from update_submodule() (diff)
downloadgit-96a907376b10c42879dafc7f6b4842f8dbc04597.tar.xz
git-96a907376b10c42879dafc7f6b4842f8dbc04597.zip
submodule--helper: add missing braces to "else" arm
Add missing braces to an "else" arm in init_submodule(), this stylistic change makes this code conform to the CodingGuidelines, and makes a subsequent commit smaller. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Glen Choo <chooglen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/submodule--helper.c')
-rw-r--r--builtin/submodule--helper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index d6a827366d..f97923ff50 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -480,8 +480,9 @@ static void init_submodule(const char *path, const char *prefix,
fprintf(stderr, _("warning: command update mode suggested for submodule '%s'\n"),
sub->name);
upd = xstrdup("none");
- } else
+ } else {
upd = xstrdup(submodule_strategy_to_string(&sub->update_strategy));
+ }
if (git_config_set_gently(sb.buf, upd))
die(_("Failed to register update mode for submodule path '%s'"), displaypath);