From 7b24d1d2d1c5e32b29bce772df37c970764e9d39 Mon Sep 17 00:00:00 2001 From: Uladzislau Shablinski Date: Sat, 22 Oct 2016 01:53:19 +0300 Subject: download_strategy: keep commit short if possible --- Library/Homebrew/download_strategy.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Library') 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 -- cgit v1.2.3