aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend
diff options
context:
space:
mode:
authorVlad Shablinsky2016-07-22 12:47:47 +0300
committerXu Cheng2016-08-06 21:25:56 +0800
commit9754dbada809260ccb8e61fedfdc8e20c9c93317 (patch)
tree606a9dbc9e9c7a286dcf16214cfa24145ce92270 /Library/Homebrew/extend
parent04cb161ddb29ab26314684edc214650cdb192046 (diff)
downloadbrew-9754dbada809260ccb8e61fedfdc8e20c9c93317.tar.bz2
Update upgrade/outdated methods for head versions
Introduce `--fetch-HEAD` option. Without this option upgrade and outdated never fetch latest upstream commit to detect if HEAD is outdated -- tabs are used instead. However, if option is passed, we fetch commit from upstream, which is more time consuming, but we can be sure that version is up-to-date or outdated.
Diffstat (limited to 'Library/Homebrew/extend')
-rw-r--r--Library/Homebrew/extend/ARGV.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/ARGV.rb b/Library/Homebrew/extend/ARGV.rb
index 4a497957b..adceee275 100644
--- a/Library/Homebrew/extend/ARGV.rb
+++ b/Library/Homebrew/extend/ARGV.rb
@@ -223,6 +223,10 @@ module HomebrewArgvExtension
include? "--force-bottle"
end
+ def fetch_head?
+ include? "--fetch-HEAD"
+ end
+
# eg. `foo -ns -i --bar` has three switches, n, s and i
def switch?(char)
return false if char.length > 1