class Pod::Source

Public Instance Methods

git(args, include_error: false) click to toggle source
# File lib/cocoapods/sources_manager.rb, line 101
def git(args, include_error: false)
  Executable.capture_command('git', args, :capture => include_error ? :merge : :out).first.strip
end
update_git_repo(show_output = false) click to toggle source
# File lib/cocoapods/sources_manager.rb, line 105
def update_git_repo(show_output = false)
  Config.instance.with_changes(:verbose => show_output) do
    args = %W(-C #{repo} fetch origin)
    args.push('--progress') if show_output
    git!(args)
    current_branch = git!(%W(-C #{repo} rev-parse --abbrev-ref HEAD)).strip
    git!(%W(-C #{repo} reset --hard origin/#{current_branch}))
  end
rescue
  raise Informative, 'CocoaPods was not able to update the ' \
    "`#{name}` repo. If this is an unexpected issue " \
    'and persists you can inspect it running ' \
    '`pod repo update --verbose`'
end