mirror of
https://github.com/gosticks/brew.git
synced 2026-10-06 15:36:59 +00:00
pull: auto fix legacy closes message
This commit is contained in:
@@ -310,8 +310,15 @@ module Homebrew
|
||||
patch_args << "-p2" if ARGV.include?("--legacy")
|
||||
patch_args << patchpath
|
||||
|
||||
start_revision = `git rev-parse HEAD`.strip
|
||||
|
||||
begin
|
||||
safe_system "git", "am", *patch_args
|
||||
if ARGV.include?("--legacy")
|
||||
safe_system "git", "filter-branch", "-f", "--msg-filter",
|
||||
"sed -E -e \"s/ (#[0-9]+)/ Homebrew\\/homebrew\\1/g\"",
|
||||
"#{start_revision}..HEAD"
|
||||
end
|
||||
rescue ErrorDuringExecution
|
||||
if ARGV.include? "--resolve"
|
||||
odie "Patch failed to apply: try to resolve it."
|
||||
|
||||
Reference in New Issue
Block a user