pull: fix head_revision definition.

Fixes #7405.
This commit is contained in:
Mike McQuaid 2020-04-20 19:54:38 +01:00
parent a5b6c5f262
commit 9457d1af5e
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -110,7 +110,7 @@ module Homebrew
old_versions = current_versions_from_info_external(patch_changes[:formulae].first) if is_bumpable
patch_puller.apply_patch
end_revision = head_revision(url)
end_revision = `git rev-parse --short HEAD`.strip
changed_formulae_names = []
@ -197,10 +197,6 @@ module Homebrew
end
end
def head_revision(_url, fetched)
Utils.popen_read("git", "rev-parse", fetched ? "FETCH_HEAD" : "HEAD").strip
end
class PatchPuller
attr_reader :base_url
attr_reader :patch_url