diff options
author | Pierre-Olivier Latour <pol@mac.com> | 2014-10-28 22:18:38 -0700 |
---|---|---|
committer | Pierre-Olivier Latour <pol@mac.com> | 2014-11-09 07:27:30 +0900 |
commit | e284c451b0d7c3ddac383eb35f2c36cb3859eb32 (patch) | |
tree | e2730325f0b4e88b616edd2d239cc209a7eb96c6 /src/fetch.c | |
parent | 02bc5233041ba0b83fc8db66e02214c99f1e75fe (diff) | |
download | libgit2-e284c451b0d7c3ddac383eb35f2c36cb3859eb32.tar.gz |
Changed GIT_REMOTE_DOWNLOAD_TAGS_ALL to behave like git 1.9.0
Diffstat (limited to 'src/fetch.c')
-rw-r--r-- | src/fetch.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/fetch.c b/src/fetch.c index 9ff95d935..f61685619 100644 --- a/src/fetch.c +++ b/src/fetch.c @@ -28,15 +28,15 @@ static int maybe_want(git_remote *remote, git_remote_head *head, git_odb *odb, g if (remote->download_tags == GIT_REMOTE_DOWNLOAD_TAGS_ALL) { /* - * If tagopt is --tags, then we only use the default - * tags refspec and ignore the remote's + * If tagopt is --tags, always request tags + * in addition to the remote's refspecs */ if (git_refspec_src_matches(tagspec, head->name)) match = 1; - else - return 0; - } else if (git_remote__matching_refspec(remote, head->name)) - match = 1; + } + + if (!match && git_remote__matching_refspec(remote, head->name)) + match = 1; if (!match) return 0; |