[PATCH v7 05/20] builtin/submodule--helper.c: reformat designated initializers
- From
Glen Choo <chooglen@google.com>
- Date
- Feb 10, 2022, 09:28 UTC
- Message-ID
- <20220210092833.55360-6-chooglen@google.com>
- In-Reply-To
- <20220210092833.55360-1-chooglen@google.com>
From: Atharva Raykar <raykar.ath@gmail.com>
The second hunk here will make a subsequent commit's diff smaller, and let's do the first and third hunks while we're at it so that we consistently format all of these.
Signed-off-by: Atharva Raykar <raykar.ath@gmail.com> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> --- builtin/submodule--helper.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index db71e6f4ec..9f79bdf4d5 100644 --- a/builtin/submodule--helper.c +++ b/builtin/submodule--helper.c @@ -1654,7 +1654,10 @@ struct module_clone_data { unsigned int require_init: 1; int single_branch; }; -#define MODULE_CLONE_DATA_INIT { .reference = STRING_LIST_INIT_NODUP, .single_branch = -1 } +#define MODULE_CLONE_DATA_INIT { \ + .reference = STRING_LIST_INIT_NODUP, \ + .single_branch = -1, \ +} struct submodule_alternate_setup { const char *submodule_name; @@ -2047,7 +2050,9 @@ struct update_data { unsigned int nofetch: 1; unsigned int just_cloned: 1; }; -#define UPDATE_DATA_INIT { .update_strategy = SUBMODULE_UPDATE_STRATEGY_INIT } +#define UPDATE_DATA_INIT { \ + .update_strategy = SUBMODULE_UPDATE_STRATEGY_INIT, \ +} static void next_submodule_warn_missing(struct submodule_update_clone *suc, struct strbuf *out, const char *displaypath) @@ -3013,7 +3018,9 @@ struct add_data { unsigned int progress: 1; unsigned int dissociate: 1; }; -#define ADD_DATA_INIT { .depth = -1 } +#define ADD_DATA_INIT { \ + .depth = -1, \ +} static void append_fetch_remotes(struct strbuf *msg, const char *git_dir_path) {
-- 2.33.GIT