aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2010-09-13 15:00:54 -0700
committerAdam Vandenberg2010-09-13 15:00:54 -0700
commitd518fca81c7ecebcb56feaabdb142dfd322b429c (patch)
tree356de81957c79d62535b07e72715a90289938c81 /Library
parent2f438179a7dbfe7599e6e20727600556a5f521c3 (diff)
downloadbrew-d518fca81c7ecebcb56feaabdb142dfd322b429c.tar.bz2
Fetch new tags for git repos when cached.
Diffstat (limited to 'Library')
-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