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`.
This commit is contained in:
Mike McQuaid 2016-05-30 17:01:36 +01:00
parent 12da7d740d
commit d3ce497607

View File

@ -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