Start versioning cached git clones

This commit is contained in:
Jack Nagel 2014-12-17 23:09:30 -05:00
parent 6096ec9568
commit 1cfeba04a8

View File

@ -534,6 +534,10 @@ class GitDownloadStrategy < VCSDownloadStrategy
"git" "git"
end end
def cache_version
0
end
def update def update
cached_location.cd do cached_location.cd do
config_repo config_repo
@ -600,6 +604,7 @@ class GitDownloadStrategy < VCSDownloadStrategy
def clone_repo def clone_repo
safe_system 'git', *clone_args safe_system 'git', *clone_args
safe_system "git", "config", "homebrew.cacheversion", cache_version
cached_location.cd { update_submodules } if submodules? cached_location.cd { update_submodules } if submodules?
end end