diff options
author | Carlos Martín Nieto <carlos@cmartin.tk> | 2012-03-03 20:25:05 +0400 |
---|---|---|
committer | Carlos Martín Nieto <carlos@cmartin.tk> | 2012-04-12 22:25:25 +0400 |
commit | 5cf7bccd2b72582186963f8758e883e0a978041a (patch) | |
tree | 8d0c89e14b3f00246ab2d8b26d605212555ab5a9 /tests-clar/revwalk | |
parent | 2c4ef1dd0da560e91b6440aa430537b98e8345dc (diff) |
revwalk: add test hiding a commit without a merge base
Nothing should be hidden and this shouldn't bother the merge base
calculation.
Diffstat (limited to 'tests-clar/revwalk')
-rw-r--r-- | tests-clar/revwalk/basic.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests-clar/revwalk/basic.c b/tests-clar/revwalk/basic.c index a364d82b0..7d54ce990 100644 --- a/tests-clar/revwalk/basic.c +++ b/tests-clar/revwalk/basic.c @@ -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); +} |