]> git.ipfire.org Git - thirdparty/git.git/blob - t/helper/test-bitmap.c
Merge branch 'tz/lib-gpg-prereq-fix'
[thirdparty/git.git] / t / helper / test-bitmap.c
1 #include "test-tool.h"
2 #include "git-compat-util.h"
3 #include "pack-bitmap.h"
4 #include "setup.h"
5
6 static int bitmap_list_commits(void)
7 {
8 return test_bitmap_commits(the_repository);
9 }
10
11 static int bitmap_dump_hashes(void)
12 {
13 return test_bitmap_hashes(the_repository);
14 }
15
16 int 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();
25 if (!strcmp(argv[1], "dump-hashes"))
26 return bitmap_dump_hashes();
27
28 usage:
29 usage("\ttest-tool bitmap list-commits\n"
30 "\ttest-tool bitmap dump-hashes");
31
32 return -1;
33 }