diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2018-09-13 20:02:13 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-09-17 22:49:38 +0200 |
commit | 56ee7ff15655fa1c9a1368ddd717fc84556359bc (patch) | |
tree | d5aba233c33b1a11faac323eb97de0d33e3f84e6 /builtin | |
parent | pack-objects: consider packs in multi-pack-index (diff) | |
download | git-56ee7ff15655fa1c9a1368ddd717fc84556359bc.tar.xz git-56ee7ff15655fa1c9a1368ddd717fc84556359bc.zip |
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')
-rw-r--r-- | builtin/multi-pack-index.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/multi-pack-index.c b/builtin/multi-pack-index.c index 2633efd95d..fca70f8e4f 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]); } |