Fix :sha spec so that it actually checks out the SHA

:sha was used to prevent the "--depth" option to git clone, but was
never actually used to checkout the SHA.

Closes Homebrew/homebrew#7859.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Daniel Bingham 2011-09-27 16:07:47 -07:00 committed by Jack Nagel
parent 2f85acfeb2
commit fbd0d7ec7b

View File

@ -344,7 +344,7 @@ class GitDownloadStrategy < AbstractDownloadStrategy
case @spec case @spec
when :branch when :branch
nostdout { quiet_safe_system 'git', 'checkout', "origin/#{@ref}" } nostdout { quiet_safe_system 'git', 'checkout', "origin/#{@ref}" }
when :tag when :tag, :sha
nostdout { quiet_safe_system 'git', 'checkout', @ref } nostdout { quiet_safe_system 'git', 'checkout', @ref }
end end
else else