summaryrefslogtreecommitdiff
path: root/builtin/multi-pack-index.c
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2018-09-13 18:02:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-09-17 20:49:38 (GMT)
commit56ee7ff15655fa1c9a1368ddd717fc84556359bc (patch)
treed5aba233c33b1a11faac323eb97de0d33e3f84e6 /builtin/multi-pack-index.c
parent6a22d521260f86dff8fe6f23ab329cebb62ba4f0 (diff)
downloadgit-56ee7ff15655fa1c9a1368ddd717fc84556359bc.zip
git-56ee7ff15655fa1c9a1368ddd717fc84556359bc.tar.gz
git-56ee7ff15655fa1c9a1368ddd717fc84556359bc.tar.bz2
multi-pack-index: add 'verify' verb
The multi-pack-index builtin writes multi-pack-index files, and uses a 'write' verb to do so. Add a 'verify' verb that checks this file matches the contents of the pack-indexes it replaces. The current implementation is a no-op, but will be extended in small increments in later commits. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/multi-pack-index.c')
-rw-r--r--builtin/multi-pack-index.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/multi-pack-index.c b/builtin/multi-pack-index.c
index 2633efd..fca70f8 100644
--- a/builtin/multi-pack-index.c
+++ b/builtin/multi-pack-index.c
@@ -5,7 +5,7 @@
#include "midx.h"
static char const * const builtin_multi_pack_index_usage[] = {
- N_("git multi-pack-index [--object-dir=<dir>] write"),
+ N_("git multi-pack-index [--object-dir=<dir>] (write|verify)"),
NULL
};
@@ -42,6 +42,8 @@ int cmd_multi_pack_index(int argc, const char **argv,
if (!strcmp(argv[0], "write"))
return write_midx_file(opts.object_dir);
+ if (!strcmp(argv[0], "verify"))
+ return verify_midx_file(opts.object_dir);
die(_("unrecognized verb: %s"), argv[0]);
}