From 0ba1ea7fbfc059e0e0114b4fc0bd66f3058d8b48 Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Tue, 12 Nov 2019 01:00:22 +0900 Subject: [PATCH] Always use git.ruby-lang.org as origin naruse sets remote.origin.pushUrl = nonexistent as fail-safe configuration to avoid accidentally push a new branch to origin. --- tool/merger.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tool/merger.rb b/tool/merger.rb index c59f9ac5a9..01911ad76b 100755 --- a/tool/merger.rb +++ b/tool/merger.rb @@ -12,6 +12,7 @@ require 'uri' require 'shellwords' ENV['LC_ALL'] = 'C' +ORIGIN = 'git@git.ruby-lang.org:ruby.git' module Merger REPOS = 'svn+ssh://svn@ci.ruby-lang.org/ruby/' @@ -150,7 +151,7 @@ class << Merger unless execute('git', 'tag', tagname) abort 'specfied tag already exists. check tag name and remove it if you want to force re-tagging' end - execute('git', 'push', 'origin', tagname, interactive: true) + execute('git', 'push', ORIGIN, tagname, interactive: true) end end @@ -176,7 +177,7 @@ class << Merger execute('svn', 'rm', '-m', "remove tag #{tagname}", tag_url, interactive: true) else execute('git', 'tag', '-d', tagname) - execute('git', 'push', 'origin', ":#{tagname}", interactive: true) + execute('git', 'push', ORIGIN, ":#{tagname}", interactive: true) end end @@ -218,7 +219,7 @@ class << Merger current_branch = IO.popen(['git', 'rev-parse', '--abbrev-ref', 'HEAD'], &:read).strip execute('git', 'add', '.') && execute('git', 'commit', '-F', file) && - execute('git', 'push', 'origin', current_branch) + execute('git', 'push', ORIGIN, current_branch) end end