From 505b5d0c815a9b8f78bf7267e57ea433f04d0b6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Tue, 7 May 2013 16:01:22 +0200 Subject: remote: correctly interpret tagopt '--tags' When tagopt is set to '--tags', we should only take the default tags refspec into account and ignore any configured ones. Bring the code into compliance. --- tests-clar/network/remote/local.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests-clar') diff --git a/tests-clar/network/remote/local.c b/tests-clar/network/remote/local.c index 74ef63dc9..3cb8a25d6 100644 --- a/tests-clar/network/remote/local.c +++ b/tests-clar/network/remote/local.c @@ -141,3 +141,20 @@ void test_network_remote_local__shorthand_fetch_refspec1(void) cl_git_fail(git_reference_lookup(&ref, repo, "refs/tags/hard_tag")); } + +void test_network_remote_local__tagopt(void) +{ + git_reference *ref; + + connect_to_local_repository(cl_fixture("testrepo.git")); + git_remote_set_autotag(remote, GIT_REMOTE_DOWNLOAD_TAGS_ALL); + + cl_git_pass(git_remote_download(remote, NULL, NULL)); + cl_git_pass(git_remote_update_tips(remote)); + + + cl_git_fail(git_reference_lookup(&ref, repo, "refs/remotes/master")); + + cl_git_pass(git_reference_lookup(&ref, repo, "refs/tags/hard_tag")); + git_reference_free(ref); +} -- cgit v1.2.3