Skip to content

Commit b25b727

Browse files
ttaylorrgitster
authored andcommitted
builtin/multi-pack-index.c: define common usage with a macro
Factor out the usage message into pieces corresponding to each mode. This avoids options specific to one sub-command from being shared with another in the usage. A subsequent commit will use these #define macros to have usage variables for each sub-command without duplicating their contents. Signed-off-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cf1f538 commit b25b727

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

builtin/multi-pack-index.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,23 @@
55
#include "midx.h"
66
#include "trace2.h"
77

8+
#define BUILTIN_MIDX_WRITE_USAGE \
9+
N_("git multi-pack-index [<options>] write")
10+
11+
#define BUILTIN_MIDX_VERIFY_USAGE \
12+
N_("git multi-pack-index [<options>] verify")
13+
14+
#define BUILTIN_MIDX_EXPIRE_USAGE \
15+
N_("git multi-pack-index [<options>] expire")
16+
17+
#define BUILTIN_MIDX_REPACK_USAGE \
18+
N_("git multi-pack-index [<options>] repack [--batch-size=<size>]")
19+
820
static char const * const builtin_multi_pack_index_usage[] = {
9-
N_("git multi-pack-index [<options>] (write|verify|expire|repack --batch-size=<size>)"),
21+
BUILTIN_MIDX_WRITE_USAGE,
22+
BUILTIN_MIDX_VERIFY_USAGE,
23+
BUILTIN_MIDX_EXPIRE_USAGE,
24+
BUILTIN_MIDX_REPACK_USAGE,
1025
NULL
1126
};
1227

0 commit comments

Comments
 (0)