From c8fed576cb896fd4523ebca9fdf7a78dce0087a0 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Sun, 3 Apr 2016 00:07:32 +0800 Subject: pull: auto fix legacy closes message --- Library/Homebrew/cmd/pull.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Library/Homebrew/cmd/pull.rb') diff --git a/Library/Homebrew/cmd/pull.rb b/Library/Homebrew/cmd/pull.rb index e73ead192..eefda3136 100644 --- a/Library/Homebrew/cmd/pull.rb +++ b/Library/Homebrew/cmd/pull.rb @@ -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." -- cgit v1.2.3