diff options
| author | Markus Reiter | 2016-09-21 09:48:24 +0200 |
|---|---|---|
| committer | Markus Reiter | 2016-09-23 15:30:06 +0200 |
| commit | 0b473ebba9c84724274d8d49d1ddc88de3479b7f (patch) | |
| tree | 80613314850916227ea0e7b2388e5934b4747c89 /Library/Homebrew | |
| parent | 9ce3c8d8a4059be6187dfcfd3daddfa7ef48c656 (diff) | |
| download | brew-0b473ebba9c84724274d8d49d1ddc88de3479b7f.tar.bz2 | |
Fix Style/PredicateName.
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/cask/.rubocop.yml | 3 | ||||
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 8 |
2 files changed, 4 insertions, 7 deletions
diff --git a/Library/Homebrew/cask/.rubocop.yml b/Library/Homebrew/cask/.rubocop.yml index 08696fdb8..076b87f61 100644 --- a/Library/Homebrew/cask/.rubocop.yml +++ b/Library/Homebrew/cask/.rubocop.yml @@ -115,9 +115,6 @@ Style/PercentLiteralDelimiters: '%W': '[]' '%x': '()' -Style/PredicateName: - NameWhitelist: is_32_bit?, is_64_bit? - Style/RaiseArgs: EnforcedStyle: exploded diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 2762f01b0..d19d131a7 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -663,7 +663,7 @@ class GitDownloadStrategy < VCSDownloadStrategy @shallow && support_depth? end - def is_shallow_clone? + def shallow_dir? git_dir.join("shallow").exist? end @@ -675,7 +675,7 @@ class GitDownloadStrategy < VCSDownloadStrategy cached_location.join(".git") end - def has_ref? + def ref? quiet_system "git", "--git-dir", git_dir, "rev-parse", "-q", "--verify", "#{@ref}^{commit}" end @@ -717,8 +717,8 @@ class GitDownloadStrategy < VCSDownloadStrategy end def update_repo - if @ref_type == :branch || !has_ref? - if !shallow_clone? && is_shallow_clone? + if @ref_type == :branch || !ref? + if !shallow_clone? && shallow_dir? quiet_safe_system "git", "fetch", "origin", "--unshallow" else quiet_safe_system "git", "fetch", "origin" |
