summaryrefslogtreecommitdiff
path: root/tool/sync_default_gems.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-11-30 14:48:26 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-11-30 14:48:26 +0900
commit80705e2c4fe7c1e968830880ea4408990e3f3c39 (patch)
tree61ba593635a4c3ef7b5ae4c5c4f641c7a0fb125a /tool/sync_default_gems.rb
parentf8cc05dec37f78b15814d0b936786d4e84d7d448 (diff)
Add to support the single commit for sync_default_gems.rb
Diffstat (limited to 'tool/sync_default_gems.rb')
-rw-r--r--tool/sync_default_gems.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb
index d50cad1658..810f1e9a92 100644
--- a/tool/sync_default_gems.rb
+++ b/tool/sync_default_gems.rb
@@ -279,6 +279,10 @@ def sync_default_gems_with_commits(gem, range)
end
system(*%W"git fetch --no-tags #{gem}")
+ unless range.include?("..")
+ range = "#{range}~1..#{range}"
+ end
+
commits = IO.popen(%W"git log --format=%H,%s #{range}") do |f|
f.read.split("\n").reverse.map{|commit| commit.split(',', 2)}
end