diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2014-11-07 15:00:11 +0100 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-11-09 16:07:43 +0100 |
commit | aad638f3a1e4d98296c2ec9c4ed08f217a652c5c (patch) | |
tree | 4276b661b94c788f5aca4c5757846af758bf89d3 /tests/network/remote/local.c | |
parent | b4e5432ff032c7d05c82ad2871e27f990493d6b7 (diff) | |
download | libgit2-cmn/push-refspec-refactor.tar.gz |
push: use the common refspec parsercmn/push-refspec-refactor
There is one well-known and well-tested parser which we should use,
instead of implementing parsing a second time.
The common parser is also augmented to copy the LHS into the RHS if the
latter is empty.
The expressions test had to change a bit, as we now catch a bad RHS of a
refspec locally.
Diffstat (limited to 'tests/network/remote/local.c')
-rw-r--r-- | tests/network/remote/local.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/network/remote/local.c b/tests/network/remote/local.c index 7e575b7b9..8d6f90c95 100644 --- a/tests/network/remote/local.c +++ b/tests/network/remote/local.c @@ -212,7 +212,7 @@ void test_network_remote_local__push_to_bare_remote(void) /* Try to push */ cl_git_pass(git_push_new(&push, localremote)); - cl_git_pass(git_push_add_refspec(push, "refs/heads/master:")); + cl_git_pass(git_push_add_refspec(push, "refs/heads/master")); cl_git_pass(git_push_finish(push)); cl_assert(git_push_unpack_ok(push)); @@ -258,7 +258,7 @@ void test_network_remote_local__push_to_bare_remote_with_file_url(void) /* Try to push */ cl_git_pass(git_push_new(&push, localremote)); - cl_git_pass(git_push_add_refspec(push, "refs/heads/master:")); + cl_git_pass(git_push_add_refspec(push, "refs/heads/master")); cl_git_pass(git_push_finish(push)); cl_assert(git_push_unpack_ok(push)); @@ -301,7 +301,7 @@ void test_network_remote_local__push_to_non_bare_remote(void) /* Try to push */ cl_git_pass(git_push_new(&push, localremote)); - cl_git_pass(git_push_add_refspec(push, "refs/heads/master:")); + cl_git_pass(git_push_add_refspec(push, "refs/heads/master")); cl_git_fail_with(git_push_finish(push), GIT_EBAREREPO); cl_assert_equal_i(0, git_push_unpack_ok(push)); |