diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2014-02-01 19:27:42 +0400 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-02-05 15:16:44 +0400 |
commit | d18209eef9a7fbbccb495b6e5450d14a76623847 (patch) | |
tree | 74d549d10da8decfee70435b7b30f4e2d99efc1f /tests/revwalk | |
parent | af81720236f05f72cfe763208143b5dacb2f99a2 (diff) |
revwalk: add a test for pushing all references
This used to be broken, let's make sure we don't break this use-case.
Diffstat (limited to 'tests/revwalk')
-rw-r--r-- | tests/revwalk/basic.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/revwalk/basic.c b/tests/revwalk/basic.c index 4d6522c1c..9fe8a350b 100644 --- a/tests/revwalk/basic.c +++ b/tests/revwalk/basic.c @@ -271,3 +271,22 @@ void test_revwalk_basic__push_mixed(void) /* git rev-list --count --glob=tags #=> 9 */ cl_assert_equal_i(9, i); } + +void test_revwalk_basic__push_all(void) +{ + git_oid oid; + int i = 0; + + revwalk_basic_setup_walk(NULL); + + git_revwalk_reset(_walk); + git_revwalk_sorting(_walk, 0); + cl_git_pass(git_revwalk_push_glob(_walk, "*")); + + while (git_revwalk_next(&oid, _walk) == 0) { + i++; + } + + /* git rev-list --count --all #=> 15 */ + cl_assert_equal_i(15, i); +} |