mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-08 14:02:48 +00:00
revwalk: add test hiding a commit without a merge base
Nothing should be hidden and this shouldn't bother the merge base calculation.
This commit is contained in:
parent
2c4ef1dd0d
commit
5cf7bccd2b
@ -163,3 +163,19 @@ void test_revwalk_basic__push_head_hide_ref(void)
|
||||
/* git log HEAD --oneline --not refs/heads/packed-test | wc -l => 4 */
|
||||
cl_assert(i == 4);
|
||||
}
|
||||
|
||||
void test_revwalk_basic__push_head_hide_ref_nobase(void)
|
||||
{
|
||||
int i = 0;
|
||||
git_oid oid;
|
||||
|
||||
cl_git_pass(git_revwalk_push_head(_walk));
|
||||
cl_git_pass(git_revwalk_hide_ref(_walk, "refs/heads/packed"));
|
||||
|
||||
while (git_revwalk_next(&oid, _walk) == GIT_SUCCESS) {
|
||||
i++;
|
||||
}
|
||||
|
||||
/* git log HEAD --oneline --not refs/heads/packed | wc -l => 7 */
|
||||
cl_assert(i == 7);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user