CocoaPods / cocoapods-downloader

A small library that provides downloaders for various source types (HTTP/SVN/Git/Mercurial)
MIT License
84 stars 72 forks source link

Validate the ref that was checked out was a tag #73

Closed keith closed 6 years ago

keith commented 6 years ago

Previously if you had a repo with a branch and a tag with the same name, using git clone --branch would prefer the branch, which may or may not be the same source as the tag. Now we checkout the tag unambiguously. The biggest downside here is we no longer do a shallow clone in this case.

keith commented 6 years ago

I've updated the test git repo so there is a branch named v1.0 that is not at the same place as the tag, this validates the new behavior with the tag checkout test.

keith commented 6 years ago

Hmm so since this test repo doesn't have a remote, I'm not sure how to convert our --single-branch "clone" into a fully fledged clone with the tags we need.

dnkoutso commented 6 years ago

I think we should land this, its a good check