Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2012-02-28 01:46:45 +0400
committerCarlos Martín Nieto <carlos@cmartin.tk>2012-02-28 01:46:45 +0400
commita4a910dd9c485989cecdf8af19750a11f0d2653d (patch)
tree614eaf15e8974b2c594271fabb379c6446e8a235 /tests-clar/revwalk
parentf7367993cba7b6a3c72da0b4a09c0ae88c7446c0 (diff)
Simple test for pushing HEAD and hiding a branch
Diffstat (limited to 'tests-clar/revwalk')
-rw-r--r--tests-clar/revwalk/basic.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests-clar/revwalk/basic.c b/tests-clar/revwalk/basic.c
index fff93ec93..cc88ec65b 100644
--- a/tests-clar/revwalk/basic.c
+++ b/tests-clar/revwalk/basic.c
@@ -147,3 +147,20 @@ void test_revwalk_basic__push_head(void)
/* git log HEAD --oneline | wc -l => 7 */
cl_assert(i == 7);
}
+
+void test_revwalk_basic__push_head_hide_glob(void)
+{
+ int i = 0;
+ git_oid oid;
+
+ cl_git_pass(git_revwalk_push_head(_walk));
+ /* This is a hack, as we know this will only match the packed-test branch */
+ cl_git_pass(git_revwalk_hide_glob(_walk, "heads/packed-test*"));
+
+ while (git_revwalk_next(&oid, _walk) == GIT_SUCCESS) {
+ i++;
+ }
+
+ /* git log HEAD --oneline --not refs/heads/packed-test | wc -l => 4 */
+ cl_assert(i == 4);
+}