diff options
author | Jameson Miller <jamill@microsoft.com> | 2013-05-04 20:14:40 +0400 |
---|---|---|
committer | Jameson Miller <jamill@microsoft.com> | 2013-05-04 20:14:40 +0400 |
commit | 6f748f3885d7c99cfc7df431bf0c2ca84b70016b (patch) | |
tree | cdff25e9b4d4487a6cf6a0b50149fc9a88e680eb /tests-clar/clone | |
parent | dfec726bbae0e699b78db8f1b63372134c8467a6 (diff) |
Do not write tagopt configuration option on clone by default
Diffstat (limited to 'tests-clar/clone')
-rw-r--r-- | tests-clar/clone/nonetwork.c | 18 |
1 files changed, 18 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); } |