1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Simplified f13a00f5b4 [ci skip]

This commit is contained in:
Nobuyoshi Nakada 2019-08-25 11:38:15 +09:00
parent f13a00f5b4
commit b341e98b04
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -573,17 +573,11 @@ class VCS
end
rev unless rev.empty?
end
if /./.match(from) or /./.match(from = branch_beginning(url))
from += "^"
else
unless /./.match(from) or /./.match(from = branch_beginning(url))
warn "no starting commit found", uplevel: 1
from = cmd_pipe(%W[ #{COMMAND} log --format=format:%H --reverse --since=1\ year\ ago], &:gets)
from.strip!
unless /./.match(from)
raise "cannot find the beginning revision of the branch"
end
from = nil
end
range = [from, (to || 'HEAD')].join('..')
range = [from, (to || 'HEAD')].compact.join('^..')
cmd_pipe({'TZ' => 'JST-9', 'LANG' => 'C', 'LC_ALL' => 'C'},
%W"#{COMMAND} log --format=medium --notes=commits --date=iso-local --topo-order #{range}", "rb") do |r|
format_changelog(r, path)