Skip to content

Commit 9dc2027

Browse files
committed
tests: shallow objects have no parents
1 parent 3e2ee79 commit 9dc2027

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/repo/shallow.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,16 @@ void test_repo_shallow__revwalk_behavior(void)
110110

111111
git_revwalk_free(w);
112112
}
113+
114+
void test_repo_shallow__grafted_object(void)
115+
{
116+
git_commit *commit;
117+
118+
g_repo = cl_git_sandbox_init("shallow.git");
119+
120+
cl_git_pass(git_commit_lookup(&commit, g_repo, &g_shallow_oid));
121+
122+
cl_assert_equal_i(0, git_commit_parentcount(commit));
123+
124+
git_commit_free(commit);
125+
}

0 commit comments

Comments
 (0)