diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-07-14 22:05:39 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-07-14 23:07:31 +0900 |
commit | 85497744305fcd7ff2b7768867f68c8fac03c8a0 (patch) | |
tree | af99a29fc2eb93af123e8ea64d928768b150b008 /tool | |
parent | 0bf829c17b92c608bc374f03a63b89a940d61955 (diff) | |
download | ruby-85497744305fcd7ff2b7768867f68c8fac03c8a0.tar.gz |
Tweak upstream information of upstream commit.
Diffstat (limited to 'tool')
-rw-r--r-- | tool/sync_default_gems.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index 897fa79b94..93031ac849 100644 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -253,7 +253,9 @@ def sync_default_gems_with_commits(gem, range) break end - `git filter-branch -f --msg-filter 'echo "[#{$repositories[gem.to_sym]}]" && echo && cat' -- HEAD~1..HEAD` + 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` unless $?.success? puts "Failed to modify commit message of #{sha}" break |