diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2021-10-10 23:48:45 -0700 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2021-10-10 23:49:15 -0700 |
commit | b5f0e209362bd62f9d1b2258eeff9649ef051b61 (patch) | |
tree | 2d1f43194050f0179e283d27a58b28f897f8e6fe /tool/sync_default_gems.rb | |
parent | 340fabca2c8abe29efe5c5a5c0f3ddc9b2ba8035 (diff) |
Add comments in sync_default_gems.rb
to ease the maintenance of ruby-commit-hook/bin/update-default-gem.sh
Diffstat (limited to 'tool/sync_default_gems.rb')
-rwxr-xr-x | tool/sync_default_gems.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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 = { 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) } 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." |