5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/cocoapods-ve/ext/sources_manager.rb', line 5
def update_git_repo(show_output = false)
Config.instance.with_changes(:verbose => show_output) do
begin
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}))
rescue Exception => e
UI.warn 'Unable g error, clean and re clone'
`rm -rf #{repo}`
git!(%W( clone #{url} #{repo}))
end
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
|