diff options
author | Michael Schubert <schu@schu.io> | 2012-10-24 15:46:15 +0200 |
---|---|---|
committer | Michael Schubert <schu@schu.io> | 2012-10-24 15:46:15 +0200 |
commit | ab2af775ec467ebb328a7374653f247920f258f3 (patch) | |
tree | dfcb09fadc67bc28a99bffcb8b751d426024974c /tests-clar/network | |
parent | 90fefe87d87b08010a1ea10ae496a4b0ee630f5e (diff) | |
parent | 6f6b0c013c6eff2aca2a7ada1027044f2e20f578 (diff) | |
download | libgit2-features/push_old.tar.gz |
Merge branch 'development' into gsoc-pushfeatures/push_old
Diffstat (limited to 'tests-clar/network')
-rw-r--r-- | tests-clar/network/remotes.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests-clar/network/remotes.c b/tests-clar/network/remotes.c index c7ee863e7..91c3e879d 100644 --- a/tests-clar/network/remotes.c +++ b/tests-clar/network/remotes.c @@ -225,3 +225,27 @@ void test_network_remotes__add(void) cl_assert(!strcmp(git_refspec_dst(_refspec), "refs/remotes/addtest/*")); cl_assert_equal_s(git_remote_url(_remote), "http://github.com/libgit2/libgit2"); } + +void test_network_remotes__tagopt(void) +{ + const char *opt; + git_config *cfg; + + cl_git_pass(git_repository_config(&cfg, _repo)); + + git_remote_set_autotag(_remote, GIT_REMOTE_DOWNLOAD_TAGS_ALL); + cl_git_pass(git_remote_save(_remote)); + cl_git_pass(git_config_get_string(&opt, cfg, "remote.test.tagopt")); + cl_assert(!strcmp(opt, "--tags")); + + git_remote_set_autotag(_remote, GIT_REMOTE_DOWNLOAD_TAGS_NONE); + cl_git_pass(git_remote_save(_remote)); + cl_git_pass(git_config_get_string(&opt, cfg, "remote.test.tagopt")); + cl_assert(!strcmp(opt, "--no-tags")); + + git_remote_set_autotag(_remote, GIT_REMOTE_DOWNLOAD_TAGS_AUTO); + cl_git_pass(git_remote_save(_remote)); + cl_assert(git_config_get_string(&opt, cfg, "remote.test.tagopt") == GIT_ENOTFOUND); + + git_config_free(cfg); +} |