Solve the brew install, brew rm, brew install problem for HEAD formula

The problem was that git checkout -b doesn't work the second time. This simple solution works by never creating a local branch.
This commit is contained in:
Max Howell 2009-11-05 23:36:51 +00:00
parent 96de6ba870
commit 57fc32d279

View File

@ -150,7 +150,7 @@ class GitDownloadStrategy <AbstractDownloadStrategy
ohai "Checking out #{@spec} #{@ref}"
case @spec
when :branch
safe_system 'git', 'checkout', '-b', @ref, "origin/#{@ref}"
safe_system 'git', 'checkout', "origin/#{@ref}"
when :tag
safe_system 'git', 'checkout', @ref
end