diff options
author | Carlos Martín Nieto <carlos@cmartin.tk> | 2012-02-28 05:19:57 +0400 |
---|---|---|
committer | Carlos Martín Nieto <carlos@cmartin.tk> | 2012-04-12 22:25:24 +0400 |
commit | 06b9d915901b3dd9dc85016bb000e631eb1da1d7 (patch) | |
tree | c9a2984955e959cd5b4ca44809fa4e68f92d9f93 /tests-clar/revwalk | |
parent | 081d229106faae3c37c08940fd510a3511bfbd59 (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.c | 5 |
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++; |