aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-12-18 12:57:37 -0500
committerJack Nagel2014-12-18 12:57:37 -0500
commitef4347b898520053ff7b4b1a3f0eaae80b7a4f9f (patch)
treea8e464984ab1f7cacfb607d0a0e1b1d91b27e211 /Library
parentcec6ee6527f48c24d98a31fa7ad255371c7d9107 (diff)
downloadbrew-ef4347b898520053ff7b4b1a3f0eaae80b7a4f9f.tar.bz2
Start versioning cached git clones
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/download_strategy.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 65d47c161..9e3f29d44 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -534,6 +534,10 @@ class GitDownloadStrategy < VCSDownloadStrategy
"git"
end
+ def cache_version
+ 0
+ end
+
def update
cached_location.cd do
config_repo
@@ -600,7 +604,10 @@ class GitDownloadStrategy < VCSDownloadStrategy
def clone_repo
safe_system 'git', *clone_args
- cached_location.cd { update_submodules } if submodules?
+ cached_location.cd do
+ safe_system "git", "config", "homebrew.cacheversion", cache_version
+ update_submodules if submodules?
+ end
end
def checkout