module Bundler::FastGit::GitProxyPatch

Public Instance Methods

git(command, *args) click to toggle source
Calls superclass method
# File lib/bundler/fast_git.rb, line 6
def git(command, *args)
  new_command =
    if command.start_with?('clone')
      new_command = command.sub('--no-hardlinks', '') + ' --depth=1'
    elsif command.start_with?('fetch')
      new_command = command + ' --depth=1'
    end

  if new_command
    Bundler.ui.debug("[bundler-fast_git] Running #{new_command}")
    super(new_command, *args)
  else
    super
  end
end