From d3ce49760793cbe775a34e10973d679ba978aa2b Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 30 May 2016 17:01:36 +0100 Subject: tap: default to full clones for developers. (#297) You need a non-shallow clone to push branches upstream so if you often tap and untap taps (e.g. `homebrew/boneyard`) then you need to remember to manually `fetch -unshallow`.--- Library/Homebrew/cmd/tap.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/tap.rb b/Library/Homebrew/cmd/tap.rb index cd785482a..49d278b7a 100644 --- a/Library/Homebrew/cmd/tap.rb +++ b/Library/Homebrew/cmd/tap.rb @@ -48,7 +48,7 @@ module Homebrew tap = Tap.fetch(ARGV.named[0]) begin tap.install :clone_target => ARGV.named[1], - :full_clone => ARGV.include?("--full"), + :full_clone => full_clone?, :quiet => ARGV.quieter? rescue TapRemoteMismatchError => e odie e @@ -58,12 +58,16 @@ module Homebrew end end + def full_clone? + ARGV.include?("--full") || ARGV.homebrew_developer? + end + # @deprecated this method will be removed in the future, if no external commands use it. def install_tap(user, repo, clone_target = nil) opoo "Homebrew.install_tap is deprecated, use Tap#install." tap = Tap.fetch(user, repo) begin - tap.install(:clone_target => clone_target, :full_clone => ARGV.include?("--full")) + tap.install(:clone_target => clone_target, :full_clone => full_clone?) rescue TapAlreadyTappedError false else -- cgit v1.2.3