summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmily Shaffer <emilyshaffer@google.com>2020-02-21 03:10:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-02-25 17:58:33 (GMT)
commit47319576f112b60ecd85930d162cd7656132fd0d (patch)
treed146c5de16c94c9de9d59fdc083fcbadeea54a4f
parentd0654dc308b0ba76dd8ed7bbb33c8d8f7aacd783 (diff)
downloadgit-47319576f112b60ecd85930d162cd7656132fd0d.zip
git-47319576f112b60ecd85930d162cd7656132fd0d.tar.gz
git-47319576f112b60ecd85930d162cd7656132fd0d.tar.bz2
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 c72931e..ea85838 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,