summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Emily Shaffer <emilyshaffer@google.com>2020-02-20 19:10:26 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-02-25 09:58:33 -0800
commit47319576f112b60ecd85930d162cd7656132fd0d (patch)
treed146c5de16c94c9de9d59fdc083fcbadeea54a4f
parentGit 2.25 (diff)
downloadtgif-47319576f112b60ecd85930d162cd7656132fd0d.tar.xz
submodule--helper: use C99 named initializer
Start using a named initializer list for SUBMODULE_UPDATE_CLONE_INIT, as the struct is becoming cumbersome for a typical struct initializer list. Signed-off-by: Emily Shaffer <emilyshaffer@google.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/submodule--helper.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index c72931ecd7..ea85838556 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -1576,10 +1576,13 @@ struct submodule_update_clone {
int max_jobs;
};
-#define SUBMODULE_UPDATE_CLONE_INIT {0, MODULE_LIST_INIT, 0, \
- SUBMODULE_UPDATE_STRATEGY_INIT, 0, 0, -1, STRING_LIST_INIT_DUP, 0, 0, \
- NULL, NULL, NULL, \
- NULL, 0, 0, 0, NULL, 0, 0, 1}
+#define SUBMODULE_UPDATE_CLONE_INIT { \
+ .list = MODULE_LIST_INIT, \
+ .update = SUBMODULE_UPDATE_STRATEGY_INIT, \
+ .recommend_shallow = -1, \
+ .references = STRING_LIST_INIT_DUP, \
+ .max_jobs = 1, \
+}
static void next_submodule_warn_missing(struct submodule_update_clone *suc,