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

download only branch with --depth 1 was not work on cocoapods 1.1.1 #66

Open simson2010 opened 7 years ago

simson2010 commented 7 years ago

I found line 24 of git.rb return options unless options[:branch]

but I was setting the right branch in my Podfile using :branch => 'xxx'. the this preprocess function will always to check the git ls-remote and replace the options[:branch] with options[:commit], then the clone_argument( force_head, shallow_clone) function would bypass the "--depth 1" paraments when downloading the source from my github, and always download the full .git and then checkout the the branch instead only download the specified branch from my github.

could you have a look at?