Skip to content

Commit 63f4d5c

Browse files
peffgitster
authored andcommitted
repack: make "exts" array available outside cmd_repack()
We'll use it in a helper function soon. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e31aba4 commit 63f4d5c

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

builtin/repack.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,16 @@ static int write_oid(const struct object_id *oid, struct packed_git *pack,
202202
return 0;
203203
}
204204

205+
static struct {
206+
const char *name;
207+
unsigned optional:1;
208+
} exts[] = {
209+
{".pack"},
210+
{".idx"},
211+
{".bitmap", 1},
212+
{".promisor", 1},
213+
};
214+
205215
static void repack_promisor_objects(const struct pack_objects_args *args,
206216
struct string_list *names)
207217
{
@@ -265,15 +275,6 @@ static void repack_promisor_objects(const struct pack_objects_args *args,
265275

266276
int cmd_repack(int argc, const char **argv, const char *prefix)
267277
{
268-
struct {
269-
const char *name;
270-
unsigned optional:1;
271-
} exts[] = {
272-
{".pack"},
273-
{".idx"},
274-
{".bitmap", 1},
275-
{".promisor", 1},
276-
};
277278
struct child_process cmd = CHILD_PROCESS_INIT;
278279
struct string_list_item *item;
279280
struct string_list names = STRING_LIST_INIT_DUP;

0 commit comments

Comments
 (0)