diff options
| author | Vicent Marti <vicent@github.com> | 2014-03-03 17:48:32 +0100 |
|---|---|---|
| committer | Vicent Marti <vicent@github.com> | 2014-03-03 17:48:32 +0100 |
| commit | c2e8374574cc0cf0f30f6a26493e2ce407740020 (patch) | |
| tree | ffb8d298cf9341361f58ed7ebc69d7224758d504 | |
| parent | 0511b15c82a6af253d9bd18ddeed85f8afd28ddd (diff) | |
| parent | d113791d8f5634b10a98eb265687b7aa79f1658e (diff) | |
| download | libgit2-c2e8374574cc0cf0f30f6a26493e2ce407740020.tar.gz | |
Merge pull request #2148 from fourplusone/patch-1
Added a test, that fails for #2133
| -rw-r--r-- | tests/online/fetch.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/online/fetch.c b/tests/online/fetch.c index cb84e846c..c54ec5673 100644 --- a/tests/online/fetch.c +++ b/tests/online/fetch.c @@ -81,6 +81,21 @@ void test_online_fetch__no_tags_http(void) do_fetch("http://github.com/libgit2/TestGitRepository.git", GIT_REMOTE_DOWNLOAD_TAGS_NONE, 3); } +void test_online_fetch__fetch_twice(void) +{ + git_remote *remote; + cl_git_pass(git_remote_create(&remote, _repo, "test", "git://github.com/libgit2/TestGitRepository.git")); + cl_git_pass(git_remote_connect(remote, GIT_DIRECTION_FETCH)); + cl_git_pass(git_remote_download(remote)); + git_remote_disconnect(remote); + + git_remote_connect(remote, GIT_DIRECTION_FETCH); + cl_git_pass(git_remote_download(remote)); + git_remote_disconnect(remote); + + git_remote_free(remote); +} + static int transferProgressCallback(const git_transfer_progress *stats, void *payload) { bool *invoked = (bool *)payload; |
