summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2021-03-30 15:03:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-03-30 19:16:56 (GMT)
commitb25b727494f4782c7af1db31fdfde1cc9b30f7c4 (patch)
tree02d06488d75fa4e007f43d58d3dedec28d100b59 /builtin
parentcf1f5389ec9eed5453c090cba347f68a3c3da3f7 (diff)
downloadgit-b25b727494f4782c7af1db31fdfde1cc9b30f7c4.zip
git-b25b727494f4782c7af1db31fdfde1cc9b30f7c4.tar.gz
git-b25b727494f4782c7af1db31fdfde1cc9b30f7c4.tar.bz2
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 <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/multi-pack-index.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/builtin/multi-pack-index.c b/builtin/multi-pack-index.c
index c70f020..eea498e 100644
--- a/builtin/multi-pack-index.c
+++ b/builtin/multi-pack-index.c
@@ -5,8 +5,23 @@
#include "midx.h"
#include "trace2.h"
+#define BUILTIN_MIDX_WRITE_USAGE \
+ N_("git multi-pack-index [<options>] write")
+
+#define BUILTIN_MIDX_VERIFY_USAGE \
+ N_("git multi-pack-index [<options>] verify")
+
+#define BUILTIN_MIDX_EXPIRE_USAGE \
+ N_("git multi-pack-index [<options>] expire")
+
+#define BUILTIN_MIDX_REPACK_USAGE \
+ N_("git multi-pack-index [<options>] repack [--batch-size=<size>]")
+
static char const * const builtin_multi_pack_index_usage[] = {
- N_("git multi-pack-index [<options>] (write|verify|expire|repack --batch-size=<size>)"),
+ BUILTIN_MIDX_WRITE_USAGE,
+ BUILTIN_MIDX_VERIFY_USAGE,
+ BUILTIN_MIDX_EXPIRE_USAGE,
+ BUILTIN_MIDX_REPACK_USAGE,
NULL
};