Skip to content
Snippets Groups Projects
Commit d3ce4976 authored by Mike McQuaid's avatar Mike McQuaid
Browse files

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`.
parent 12da7d74
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment