ruby-changes:68375
From: Takashi <ko1@a...>
Date: Mon, 11 Oct 2021 15:49:47 +0900 (JST)
Subject: [ruby-changes:68375] b5f0e20936 (master): Add comments in sync_default_gems.rb
https://git.ruby-lang.org/ruby.git/commit/?id=b5f0e20936 From b5f0e209362bd62f9d1b2258eeff9649ef051b61 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Sun, 10 Oct 2021 23:48:45 -0700 Subject: Add comments in sync_default_gems.rb to ease the maintenance of ruby-commit-hook/bin/update-default-gem.sh --- tool/sync_default_gems.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index 73cf779d50..ad07b6fcc9 100755 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -76,6 +76,7 @@ REPOSITORIES = { https://github.com/ruby/ruby/blob/trunk/tool/sync_default_gems.rb#L76 un: "ruby/un", } +# We usually don't use this. Please consider using #sync_default_gems_with_commits instead. def sync_default_gems(gem) repo = REPOSITORIES[gem.to_sym] puts "Sync #{repo}" @@ -360,6 +361,10 @@ def message_filter(repo, sha) https://github.com/ruby/ruby/blob/trunk/tool/sync_default_gems.rb#L361 } end +# NOTE: This method is also used by ruby-commit-hook/bin/update-default-gem.sh +# @param gem [String] A gem name, also used as a git remote name. REPOSITORIES converts it to the appropriate GitHub repository. +# @param ranges [Array<String>] "before..after". Note that it will NOT sync "before" (but commits after that). +# @param edit [TrueClass] Set true if you want to resolve conflicts. Obviously, update-default-gem.sh doesn't use this. def sync_default_gems_with_commits(gem, ranges, edit: nil) repo = REPOSITORIES[gem.to_sym] puts "Sync #{repo} with commit history." -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/