class Bundler::Source::Git

def git(command)

def git(command)
  if allow_git_ops?
    out = %x{git #{command}}
    if $?.exitstatus != 0
      msg = "Git error: command `git #{command}` in directory #{Dir.pwd} has failed."
      msg << "\nIf this error persists you could try removing the cache directory '#{cache_path}'" if cached?
      raise GitError, msg
    end
    out
  else
    raise GitError, "Bundler is trying to run a `git #{command}` at runtime. You probably need to run `bundle install`. However, " \
                    "this error message could probably be more useful. Please submit a ticket at http://github.com/carlhuda/bundler/issues " \
                    "with steps to reproduce as well as the following\n\nCALLER: #{caller.join("\n")}"
  end
end