aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vandenberg2010-09-13 15:00:54 -0700
committerAdam Vandenberg2010-09-13 15:00:54 -0700
commite165b3ca47e843e9840a17023b8e3d2625118ffb (patch)
tree242bd25f2856ed334741a0bed829e88b5e47b609
parentc2b267236eee16542f648b4ce43bbf054a73284c (diff)
downloadhomebrew-e165b3ca47e843e9840a17023b8e3d2625118ffb.tar.bz2
Fetch new tags for git repos when cached.
-rw-r--r--Library/Homebrew/download_strategy.rb6
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