git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/3] repack: make "exts" array available outside cmd_repack()

From
Taylor Blau <me@ttaylorr.com>
Date
Nov 16, 2020, 18:41 UTC
Message-ID
<a235722df4e373cded3fa161124924cc0a301c0c.1605552016.git.me@ttaylorr.com>
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
Previous: Taylor BlauNext: Taylor Blau
Message 2 of 11 in “repack: don't move existing packs out of the way”
  1. 0/3 repack: don't move existing packs out of the wayTaylor Blau, Nov 16, 2020
  2. 1/3 repack: make "exts" array available outside cmd_repack()Taylor Blau, Nov 16, 2020
  3. 2/3 builtin/repack.c: keep track of what pack-objects wroteTaylor Blau, Nov 16, 2020
  4. 3/3 builtin/repack.c: don't move existing packs out of the wayTaylor Blau, Nov 16, 2020
  5. Junio C HamanoNov 16, 2020
  6. Jeff KingNov 17, 2020
  7. Taylor BlauNov 17, 2020
  8. Taylor BlauNov 17, 2020
  9. Junio C HamanoNov 17, 2020
  10. Taylor BlauNov 17, 2020
  11. Junio C HamanoNov 17, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.