aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/download_strategy.rb
diff options
context:
space:
mode:
authorUladzislau Shablinski2016-10-22 01:53:19 +0300
committerUladzislau Shablinski2016-12-03 04:42:04 +0300
commit7b24d1d2d1c5e32b29bce772df37c970764e9d39 (patch)
treea20a701c8e12864ef466f0c7d08e5a6544c626b0 /Library/Homebrew/download_strategy.rb
parent5bbd64141e45d5fa2487b2bfe38299f07ba444d1 (diff)
downloadbrew-7b24d1d2d1c5e32b29bce772df37c970764e9d39.tar.bz2
download_strategy: keep commit short if possible
Diffstat (limited to 'Library/Homebrew/download_strategy.rb')
-rw-r--r--Library/Homebrew/download_strategy.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 1f77fa20c..9f9b2abab 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -832,7 +832,12 @@ class GitHubGitDownloadStrategy < GitDownloadStrategy
else
return true unless commit
return true unless @last_commit.start_with?(commit)
- multiple_short_commits_exist?(commit)
+ if multiple_short_commits_exist?(commit)
+ true
+ else
+ version.update_commit(commit)
+ false
+ end
end
end
end