git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, peff@peff.net
Subject: [PATCH 1/3] repack: make "exts" array available outside cmd_repack()
Date: Mon, 16 Nov 2020 13:41:12 -0500	[thread overview]
Message-ID: <a235722df4e373cded3fa161124924cc0a301c0c.1605552016.git.me@ttaylorr.com> (raw)
In-Reply-To: <cover.1605552016.git.me@ttaylorr.com>

From: Jeff King <peff@peff.net>

We'll use it in a helper function soon.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
---
 builtin/repack.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/builtin/repack.c b/builtin/repack.c
index 01e7767c79..03e2c2c44b 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -202,6 +202,16 @@ static int write_oid(const struct object_id *oid, struct packed_git *pack,
 	return 0;
 }
 
+static struct {
+	const char *name;
+	unsigned optional:1;
+} exts[] = {
+	{".pack"},
+	{".idx"},
+	{".bitmap", 1},
+	{".promisor", 1},
+};
+
 static void repack_promisor_objects(const struct pack_objects_args *args,
 				    struct string_list *names)
 {
@@ -265,15 +275,6 @@ static void repack_promisor_objects(const struct pack_objects_args *args,
 
 int cmd_repack(int argc, const char **argv, const char *prefix)
 {
-	struct {
-		const char *name;
-		unsigned optional:1;
-	} exts[] = {
-		{".pack"},
-		{".idx"},
-		{".bitmap", 1},
-		{".promisor", 1},
-	};
 	struct child_process cmd = CHILD_PROCESS_INIT;
 	struct string_list_item *item;
 	struct string_list names = STRING_LIST_INIT_DUP;
-- 
2.29.2.312.gabc4d358d8


  reply	other threads:[~2020-11-16 18:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16 18:41 [PATCH 0/3] repack: don't move existing packs out of the way Taylor Blau
2020-11-16 18:41 ` Taylor Blau [this message]
2020-11-16 18:41 ` [PATCH 2/3] builtin/repack.c: keep track of what pack-objects wrote Taylor Blau
2020-11-16 18:41 ` [PATCH 3/3] builtin/repack.c: don't move existing packs out of the way Taylor Blau
2020-11-16 23:29   ` Junio C Hamano
2020-11-17  0:02     ` Jeff King
2020-11-17  0:26       ` Taylor Blau
2020-11-17  0:25     ` Taylor Blau
2020-11-17  0:46       ` Junio C Hamano
2020-11-17 20:15         ` Taylor Blau
2020-11-17 21:28           ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=a235722df4e373cded3fa161124924cc0a301c0c.1605552016.git.me@ttaylorr.com \
    --to=me@ttaylorr.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).