aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/tap.rb
diff options
context:
space:
mode:
authorMike McQuaid2016-05-30 17:01:36 +0100
committerMike McQuaid2016-05-30 17:01:36 +0100
commitd3ce49760793cbe775a34e10973d679ba978aa2b (patch)
tree56f59768743c78c87fb5b95029d09f0edffb8ff4 /Library/Homebrew/cmd/tap.rb
parent12da7d740dcc3cd84db5a6c5f143eb9adbf43791 (diff)
downloadbrew-d3ce49760793cbe775a34e10973d679ba978aa2b.tar.bz2
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`.
Diffstat (limited to 'Library/Homebrew/cmd/tap.rb')
-rw-r--r--Library/Homebrew/cmd/tap.rb8
1 files changed, 6 insertions, 2 deletions
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