diff options
| author | Vicent Martà <vicent@github.com> | 2013-05-06 06:45:40 -0700 |
|---|---|---|
| committer | Vicent Martà <vicent@github.com> | 2013-05-06 06:45:40 -0700 |
| commit | d5e5bbd7193924aa845e107f747a15814a679b10 (patch) | |
| tree | 8555bd3301174c8b9b77d7c532cd7fef1b595b4c /tests-clar | |
| parent | 450a78bf07b0c255df72279d41e04270e453e2cc (diff) | |
| parent | 6f748f3885d7c99cfc7df431bf0c2ca84b70016b (diff) | |
| download | libgit2-d5e5bbd7193924aa845e107f747a15814a679b10.tar.gz | |
Merge pull request #1524 from jamill/clone_tagopts
By default do not set tagopt when cloning
Diffstat (limited to 'tests-clar')
| -rw-r--r-- | tests-clar/clone/nonetwork.c | 18 | ||||
| -rw-r--r-- | tests-clar/online/clone.c | 3 |
2 files changed, 21 insertions, 0 deletions
diff --git a/tests-clar/clone/nonetwork.c b/tests-clar/clone/nonetwork.c index 545fe3a06..8b17fd998 100644 --- a/tests-clar/clone/nonetwork.c +++ b/tests-clar/clone/nonetwork.c @@ -172,6 +172,7 @@ void test_clone_nonetwork__custom_push_spec(void) void test_clone_nonetwork__custom_autotag(void) { + git_remote *origin; git_strarray tags = {0}; g_options.remote_autotag = GIT_REMOTE_DOWNLOAD_TAGS_NONE; @@ -180,6 +181,23 @@ void test_clone_nonetwork__custom_autotag(void) cl_git_pass(git_tag_list(&tags, g_repo)); cl_assert_equal_sz(0, tags.count); + cl_git_pass(git_remote_load(&origin, g_repo, "origin")); + cl_assert_equal_i(GIT_REMOTE_DOWNLOAD_TAGS_NONE, origin->download_tags); + + git_strarray_free(&tags); +} + +void test_clone_nonetwork__custom_autotag_tags_all(void) +{ + git_strarray tags = {0}; + git_remote *origin; + + g_options.remote_autotag = GIT_REMOTE_DOWNLOAD_TAGS_ALL; + cl_git_pass(git_clone(&g_repo, cl_git_fixture_url("testrepo.git"), "./foo", &g_options)); + + cl_git_pass(git_remote_load(&origin, g_repo, "origin")); + cl_assert_equal_i(GIT_REMOTE_DOWNLOAD_TAGS_ALL, origin->download_tags); + git_strarray_free(&tags); } diff --git a/tests-clar/online/clone.c b/tests-clar/online/clone.c index c1a9a9a88..aa12e47c9 100644 --- a/tests-clar/online/clone.c +++ b/tests-clar/online/clone.c @@ -3,6 +3,7 @@ #include "git2/clone.h" #include "git2/cred_helpers.h" #include "repository.h" +#include "remote.h" #define LIVE_REPO_URL "http://github.com/libgit2/TestGitRepository" #define LIVE_EMPTYREPO_URL "http://github.com/libgit2/TestEmptyRepository" @@ -42,6 +43,8 @@ void test_online_clone__network_full(void) cl_assert(!git_repository_is_bare(g_repo)); cl_git_pass(git_remote_load(&origin, g_repo, "origin")); + cl_assert_equal_i(GIT_REMOTE_DOWNLOAD_TAGS_AUTO, origin->download_tags); + git_remote_free(origin); } |
