summaryrefslogtreecommitdiff
path: root/tool/sync_default_gems.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-10-05 16:36:11 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-10-05 17:32:36 +0900
commit82f496a84b94d435b8b6fd80595151a08801b16c (patch)
tree787febca6ccf0b75a471cb495822ba33fd234ce1 /tool/sync_default_gems.rb
parentd5ab1979f746084277da265795c2756afdb2267d (diff)
Put an empty line before the original URL
Even if the raw commit log does not end with a newline. Suggested to use `grep` by znz. Co-Authored-By: Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
Diffstat (limited to 'tool/sync_default_gems.rb')
-rw-r--r--tool/sync_default_gems.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb
index 236c16a184..c6d64e9bd9 100644
--- a/tool/sync_default_gems.rb
+++ b/tool/sync_default_gems.rb
@@ -399,7 +399,7 @@ def sync_default_gems_with_commits(gem, ranges, edit: nil)
prefix = "[#{(REPOSITORIES[gem.to_sym])}]".gsub(/\//, '\/')
suffix = "https://github.com/#{(REPOSITORIES[gem.to_sym])}/commit/#{sha[0,10]}"
- `git filter-branch -f --msg-filter 'sed "1s/^/#{prefix} /" && echo && echo #{suffix}' -- HEAD~1..HEAD`
+ `git filter-branch -f --msg-filter 'grep "" - | sed "1s/^/#{prefix} /" && echo && echo #{suffix}' -- HEAD~1..HEAD`
unless $?.success?
puts "Failed to modify commit message of #{sha}"
break