diff options
| author | nulltoken <emeric.fermas@gmail.com> | 2012-05-30 00:50:39 +0200 |
|---|---|---|
| committer | nulltoken <emeric.fermas@gmail.com> | 2012-06-04 23:47:09 +0200 |
| commit | d27bf6656158c6be1eca7e8c5e87b4d39958b18d (patch) | |
| tree | dfac20d8f7be1b4feb1290db8265b967842d7250 /tests-clar/network | |
| parent | d05e2c64dd93da7219c9ebca18c2f3b8478ca93a (diff) | |
| download | libgit2-d27bf6656158c6be1eca7e8c5e87b4d39958b18d.tar.gz | |
remote: Make git_remote_add() generate a default refspec with a force update specifier
Diffstat (limited to 'tests-clar/network')
| -rw-r--r-- | tests-clar/network/remotes.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests-clar/network/remotes.c b/tests-clar/network/remotes.c index b3a0265e6..3f631835c 100644 --- a/tests-clar/network/remotes.c +++ b/tests-clar/network/remotes.c @@ -160,6 +160,15 @@ void test_network_remotes__loading_a_missing_remote_returns_ENOTFOUND(void) cl_assert_equal_i(GIT_ENOTFOUND, git_remote_load(&_remote, _repo, "just-left-few-minutes-ago")); } +/* + * $ git remote add addtest http://github.com/libgit2/libgit2 + * + * $ cat .git/config + * [...] + * [remote "addtest"] + * url = http://github.com/libgit2/libgit2 + * fetch = +refs/heads/*:refs/remotes/addtest/* + */ void test_network_remotes__add(void) { git_remote_free(_remote); @@ -169,5 +178,6 @@ void test_network_remotes__add(void) cl_git_pass(git_remote_load(&_remote, _repo, "addtest")); _refspec = git_remote_fetchspec(_remote); cl_assert(!strcmp(git_refspec_src(_refspec), "refs/heads/*")); + cl_assert(git_refspec_force(_refspec) == 1); cl_assert(!strcmp(git_refspec_dst(_refspec), "refs/remotes/addtest/*")); } |
