]> git.ipfire.org Git - thirdparty/git.git/blame - t/helper/test-bitmap.c
The fifth batch
[thirdparty/git.git] / t / helper / test-bitmap.c
CommitLineData
483fa7f4 1#include "test-tool.h"
98750588 2#include "git-compat-util.h"
483fa7f4 3#include "pack-bitmap.h"
e38da487 4#include "setup.h"
483fa7f4
TB
5
6static int bitmap_list_commits(void)
7{
8 return test_bitmap_commits(the_repository);
9}
10
a05f02b1
TB
11static int bitmap_dump_hashes(void)
12{
13 return test_bitmap_hashes(the_repository);
14}
15
483fa7f4
TB
16int cmd__bitmap(int argc, const char **argv)
17{
18 setup_git_directory();
19
20 if (argc != 2)
21 goto usage;
22
23 if (!strcmp(argv[1], "list-commits"))
24 return bitmap_list_commits();
a05f02b1
TB
25 if (!strcmp(argv[1], "dump-hashes"))
26 return bitmap_dump_hashes();
483fa7f4
TB
27
28usage:
a05f02b1
TB
29 usage("\ttest-tool bitmap list-commits\n"
30 "\ttest-tool bitmap dump-hashes");
483fa7f4
TB
31
32 return -1;
33}