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 05:19:57 +0400
committerCarlos Martín Nieto <carlos@cmartin.tk>2012-04-12 22:25:24 +0400
commit06b9d915901b3dd9dc85016bb000e631eb1da1d7 (patch)
treec9a2984955e959cd5b4ca44809fa4e68f92d9f93 /tests-clar/revwalk
parent081d229106faae3c37c08940fd510a3511bfbd59 (diff)
revwalk: allow pushing/hiding a reference by name
The code was already there, so factor it out and let users push an OID by giving it a reference name. Only refs to commits are supported. Annotated tags will throw an error.
Diffstat (limited to 'tests-clar/revwalk')
-rw-r--r--tests-clar/revwalk/basic.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests-clar/revwalk/basic.c b/tests-clar/revwalk/basic.c
index cc88ec65b..a364d82b0 100644
--- a/tests-clar/revwalk/basic.c
+++ b/tests-clar/revwalk/basic.c
@@ -148,14 +148,13 @@ void test_revwalk_basic__push_head(void)
cl_assert(i == 7);
}
-void test_revwalk_basic__push_head_hide_glob(void)
+void test_revwalk_basic__push_head_hide_ref(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*"));
+ cl_git_pass(git_revwalk_hide_ref(_walk, "refs/heads/packed-test"));
while (git_revwalk_next(&oid, _walk) == GIT_SUCCESS) {
i++;