diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-04-13 15:28:50 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-04-13 15:28:50 -0700 |
commit | 0623669fc6ddc6dc1ad706f135826f9a0910dd4b (patch) | |
tree | 79ba87fbe7d0f045f7acb616ab7086ae1562d38d /t/helper | |
parent | Merge branch 'jk/ref-filter-segfault-fix' (diff) | |
parent | builtin/pack-objects.c: respect 'pack.preferBitmapTips' (diff) | |
download | tgif-0623669fc6ddc6dc1ad706f135826f9a0910dd4b.tar.xz |
Merge branch 'tb/pack-preferred-tips-to-give-bitmap'
A configuration variable has been added to force tips of certain
refs to be given a reachability bitmap.
* tb/pack-preferred-tips-to-give-bitmap:
builtin/pack-objects.c: respect 'pack.preferBitmapTips'
t/helper/test-bitmap.c: initial commit
pack-bitmap: add 'test_bitmap_commits()' helper
Diffstat (limited to 't/helper')
-rw-r--r-- | t/helper/test-bitmap.c | 24 | ||||
-rw-r--r-- | t/helper/test-tool.c | 1 | ||||
-rw-r--r-- | t/helper/test-tool.h | 1 |
3 files changed, 26 insertions, 0 deletions
diff --git a/t/helper/test-bitmap.c b/t/helper/test-bitmap.c new file mode 100644 index 0000000000..134a1e9d76 --- /dev/null +++ b/t/helper/test-bitmap.c @@ -0,0 +1,24 @@ +#include "test-tool.h" +#include "cache.h" +#include "pack-bitmap.h" + +static int bitmap_list_commits(void) +{ + return test_bitmap_commits(the_repository); +} + +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(); + +usage: + usage("\ttest-tool bitmap list-commits"); + + return -1; +} diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c index 287aa60023..25c6a37e93 100644 --- a/t/helper/test-tool.c +++ b/t/helper/test-tool.c @@ -15,6 +15,7 @@ struct test_cmd { static struct test_cmd cmds[] = { { "advise", cmd__advise_if_enabled }, + { "bitmap", cmd__bitmap }, { "bloom", cmd__bloom }, { "chmtime", cmd__chmtime }, { "config", cmd__config }, diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h index 9ea4b31011..f03c5988b2 100644 --- a/t/helper/test-tool.h +++ b/t/helper/test-tool.h @@ -5,6 +5,7 @@ #include "git-compat-util.h" int cmd__advise_if_enabled(int argc, const char **argv); +int cmd__bitmap(int argc, const char **argv); int cmd__bloom(int argc, const char **argv); int cmd__chmtime(int argc, const char **argv); int cmd__config(int argc, const char **argv); |