2021-04-01 01:32:11 +00:00
|
|
|
#include "test-tool.h"
|
|
|
|
#include "cache.h"
|
|
|
|
#include "pack-bitmap.h"
|
|
|
|
|
|
|
|
static int bitmap_list_commits(void)
|
|
|
|
{
|
|
|
|
return test_bitmap_commits(the_repository);
|
|
|
|
}
|
|
|
|
|
2021-09-14 22:06:02 +00:00
|
|
|
static int bitmap_dump_hashes(void)
|
|
|
|
{
|
|
|
|
return test_bitmap_hashes(the_repository);
|
|
|
|
}
|
|
|
|
|
2021-04-01 01:32:11 +00:00
|
|
|
int cmd__bitmap(int argc, const char **argv)
|
|
|
|
{
|
|
|
|
setup_git_directory();
|
|
|
|
|
|
|
|
if (argc != 2)
|
|
|
|
goto usage;
|
|
|
|
|
|
|
|
if (!strcmp(argv[1], "list-commits"))
|
|
|
|
return bitmap_list_commits();
|
2021-09-14 22:06:02 +00:00
|
|
|
if (!strcmp(argv[1], "dump-hashes"))
|
|
|
|
return bitmap_dump_hashes();
|
2021-04-01 01:32:11 +00:00
|
|
|
|
|
|
|
usage:
|
2021-09-14 22:06:02 +00:00
|
|
|
usage("\ttest-tool bitmap list-commits\n"
|
|
|
|
"\ttest-tool bitmap dump-hashes");
|
2021-04-01 01:32:11 +00:00
|
|
|
|
|
|
|
return -1;
|
|
|
|
}
|