aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorChristian Moritz2015-02-02 18:08:02 +0100
committerJack Nagel2015-02-03 20:00:34 -0500
commit79bde9c13bf99c26e3053df468920c1eb1e8652c (patch)
treeeccda3c9ff3c5dba9e8753310f9359ea2f705733 /Library
parentf2a9b9cbd21e22e9932a1aaf0f398480af11f016 (diff)
downloadbrew-79bde9c13bf99c26e3053df468920c1eb1e8652c.tar.bz2
GitDownloadStrategy: support submodule changes
This commits adds support for updating a formula with changed git submodules with GitDownloadStrategy when the cloned repository is still in the cache. This is done by running git submodule sync --recursive before updating the submodules, so that git can reload the submodule config from the updated .gitmodules file. Fixes Homebrew/homebrew#36395. Closes Homebrew/homebrew#36466. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/download_strategy.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 36c96acb4..9b3759413 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -646,6 +646,7 @@ class GitDownloadStrategy < VCSDownloadStrategy
end
def update_submodules
+ quiet_safe_system "git", "submodule", "sync", "--recursive"
quiet_safe_system "git", "submodule", "update", "--init", "--recursive"
end