Skip to content

Commit 4731957

Browse files
nasamuffingitster
authored andcommitted
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 <[email protected]> Acked-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d0654dc commit 4731957

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

builtin/submodule--helper.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,10 +1576,13 @@ struct submodule_update_clone {
15761576

15771577
int max_jobs;
15781578
};
1579-
#define SUBMODULE_UPDATE_CLONE_INIT {0, MODULE_LIST_INIT, 0, \
1580-
SUBMODULE_UPDATE_STRATEGY_INIT, 0, 0, -1, STRING_LIST_INIT_DUP, 0, 0, \
1581-
NULL, NULL, NULL, \
1582-
NULL, 0, 0, 0, NULL, 0, 0, 1}
1579+
#define SUBMODULE_UPDATE_CLONE_INIT { \
1580+
.list = MODULE_LIST_INIT, \
1581+
.update = SUBMODULE_UPDATE_STRATEGY_INIT, \
1582+
.recommend_shallow = -1, \
1583+
.references = STRING_LIST_INIT_DUP, \
1584+
.max_jobs = 1, \
1585+
}
15831586

15841587

15851588
static void next_submodule_warn_missing(struct submodule_update_clone *suc,

0 commit comments

Comments
 (0)