diff options
| author | Jack Nagel | 2013-02-14 17:29:59 -0600 | 
|---|---|---|
| committer | Jack Nagel | 2013-02-14 17:29:59 -0600 | 
| commit | 2ef79d1387745945e8bb06c98f4407bccf52f859 (patch) | |
| tree | 8db06710bde49a1b539240294cadfd2e1b0a25f0 /Library | |
| parent | 166e262312d24ddd619856ec36792c78093d55f5 (diff) | |
| download | brew-2ef79d1387745945e8bb06c98f4407bccf52f859.tar.bz2 | |
GitDownloadStrategy: default to remote HEAD during checkout
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 11 | 
1 files changed, 4 insertions, 7 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 05937b165..cbfb00254 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -377,7 +377,7 @@ class GitDownloadStrategy < AbstractDownloadStrategy    end    def clone_args -    args = %w{clone --no-checkout} +    args = %w{clone}      args << '--depth' << '1' if support_depth?      case @spec @@ -408,16 +408,13 @@ class GitDownloadStrategy < AbstractDownloadStrategy    def clone_repo      safe_system @@git, *clone_args -    @clone.cd do -      checkout -      update_submodules if submodules? -    end +    @clone.cd { update_submodules } if submodules?    end    def checkout      ref = case @spec -          when :branch         then "origin/#@ref" -          when :tag, :revision then @ref +          when :branch, :tag, :revision then @ref +          else `git symbolic-ref refs/remotes/origin/HEAD`.strip.split("/").last            end      nostdout do  | 
