diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2013-05-07 18:01:22 +0400 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2013-05-07 20:49:47 +0400 |
commit | 505b5d0c815a9b8f78bf7267e57ea433f04d0b6b (patch) | |
tree | b26198aae77490fe59d8882d5131b697e99fab83 /tests-clar | |
parent | 33665410d636c9f5f0d5e017fe6347260b1b6ec1 (diff) |
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.
Diffstat (limited to 'tests-clar')
-rw-r--r-- | tests-clar/network/remote/local.c | 17 |
1 files changed, 17 insertions, 0 deletions
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); +} |