All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emily Shaffer <emilyshaffer@google.com>
To: git@vger.kernel.org
Cc: Emily Shaffer <emilyshaffer@google.com>
Subject: [PATCH v3 1/2] submodule--helper: use C99 named initializer
Date: Thu, 20 Feb 2020 19:10:26 -0800	[thread overview]
Message-ID: <20200221031027.204486-2-emilyshaffer@google.com> (raw)
In-Reply-To: <20200221031027.204486-1-emilyshaffer@google.com>

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>
---
 builtin/submodule--helper.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index b6e4c79968..1737a91890 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -1586,10 +1586,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,
-- 
2.25.0.265.gbab2e86ba0-goog


  reply	other threads:[~2020-02-21  3:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08 23:19 [PATCH] clone: teach --single-branch and --branch during --recurse Emily Shaffer
2020-01-08 23:39 ` Emily Shaffer
2020-01-09  8:11 ` Jeff King
2020-01-16 22:38   ` Emily Shaffer
2020-01-17 21:03     ` Jeff King
2020-01-27 22:20       ` Emily Shaffer
2020-01-27 22:49         ` Emily Shaffer
2020-01-27 23:10           ` Jeff King
2020-01-28  1:08             ` Emily Shaffer
2020-01-28  1:31               ` Jeff King
2020-01-28  2:10                 ` Emily Shaffer
2020-01-27 23:00         ` Jeff King
2020-01-28 22:17 ` [PATCH v2] clone: pass --single-branch during --recurse-submodules Emily Shaffer
2020-01-30 10:23   ` Jeff King
2020-02-21  2:53     ` Emily Shaffer
2020-02-21  3:16       ` Jeff King
2020-02-21  3:10   ` [PATCH v3 0/2] propagate --single-branch during clone --recurse-submodules Emily Shaffer
2020-02-21  3:10     ` Emily Shaffer [this message]
2020-02-21  5:26       ` [PATCH v3 1/2] submodule--helper: use C99 named initializer Jeff King
2020-02-22 20:13       ` Junio C Hamano
2020-02-21  3:10     ` [PATCH v3 2/2] clone: pass --single-branch during --recurse-submodules Emily Shaffer
2020-02-21  5:28       ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200221031027.204486-2-emilyshaffer@google.com \
    --to=emilyshaffer@google.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.