summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYuang Li <yuangli@uk-yuangli-l.dhcp.mathworks.com>2022-06-28 09:29:55 +0100
committerYuang Li <yuangli@uk-yuangli-l.dhcp.mathworks.com>2022-06-28 09:29:55 +0100
commit397753f01701ed7e5148f147e3a126a0abbd33e4 (patch)
tree7fe8211afedf5757128d9ff49d24ba35a0ba2cc0 /tests
parent59189757116e2f793f0901afdfa0dea916d34444 (diff)
downloadlibgit2-397753f01701ed7e5148f147e3a126a0abbd33e4.tar.gz
enable shallow clone support in tests when necessary
Diffstat (limited to 'tests')
-rw-r--r--tests/grafts/basic.c1
-rw-r--r--tests/grafts/shallow.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/tests/grafts/basic.c b/tests/grafts/basic.c
index f91397002..3d3c65aeb 100644
--- a/tests/grafts/basic.c
+++ b/tests/grafts/basic.c
@@ -7,6 +7,7 @@ static git_repository *g_repo;
void test_grafts_basic__initialize(void)
{
+ git_libgit2_opts(GIT_OPT_ENABLE_SHALLOW, 1);
g_repo = cl_git_sandbox_init("grafted.git");
}
diff --git a/tests/grafts/shallow.c b/tests/grafts/shallow.c
index ac1d686af..339235860 100644
--- a/tests/grafts/shallow.c
+++ b/tests/grafts/shallow.c
@@ -19,6 +19,7 @@ void test_grafts_shallow__unset_feature_flag(void)
void test_grafts_shallow__initialize(void)
{
+ git_libgit2_opts(GIT_OPT_ENABLE_SHALLOW, 1);
cl_git_pass(git_oid_fromstr(&g_shallow_oid, "be3563ae3f795b2b4353bcce3a527ad0a4f7f644"));
}