Commit ada157b2 by Russell Belfer

Add warning when skipping blame test

parent d1a09004
...@@ -135,18 +135,13 @@ void test_blame_simple__trivial_libgit2(void) ...@@ -135,18 +135,13 @@ void test_blame_simple__trivial_libgit2(void)
git_blame_options opts = GIT_BLAME_OPTIONS_INIT; git_blame_options opts = GIT_BLAME_OPTIONS_INIT;
git_object *obj; git_object *obj;
/* If we can't open the libgit2 repo, just skip this test */ /* If we can't open the libgit2 repo or if it isn't a full repo
if (git_repository_open(&g_repo, cl_fixture("../..")) < 0) { * with proper history, just skip this test */
giterr_clear(); if (git_repository_open(&g_repo, cl_fixture("../..")) < 0 ||
return; git_repository_is_shallow(g_repo) ||
} git_revparse_single(&obj, g_repo, "359fc2d") < 0)
{
/* This test can't work on a shallow clone */ printf("NOT INSIDE VALID LIBGIT2 REPO; skipping blame test\n");
if (git_repository_is_shallow(g_repo))
return;
/* If somehow it is not a valid libgit2 repo, just move along */
if (git_revparse_single(&obj, g_repo, "359fc2d") < 0) {
giterr_clear(); giterr_clear();
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment