diff options
| author | Adam Vandenberg | 2010-09-13 15:00:54 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-09-13 15:00:54 -0700 |
| commit | e165b3ca47e843e9840a17023b8e3d2625118ffb (patch) | |
| tree | 242bd25f2856ed334741a0bed829e88b5e47b609 | |
| parent | c2b267236eee16542f648b4ce43bbf054a73284c (diff) | |
| download | homebrew-e165b3ca47e843e9840a17023b8e3d2625118ffb.tar.bz2 | |
Fetch new tags for git repos when cached.
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index a15cea3c2..e57c2fc80 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -257,7 +257,11 @@ class GitDownloadStrategy <AbstractDownloadStrategy safe_system 'git', 'clone', @url, @clone # indeed, leave it verbose else puts "Updating #{@clone}" - Dir.chdir(@clone) { quiet_safe_system 'git', 'fetch', @url } + Dir.chdir(@clone) do + quiet_safe_system 'git', 'fetch', @url + # If we're going to checkout a tag, then we need to fetch new tags too. + quiet_safe_system 'git', 'fetch', '--tags' if @spec == :tag + end end end |
