diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-08-25 11:38:15 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-08-25 11:38:15 +0900 |
commit | b341e98b041e5e0f1fd2f40145b0b3d9cd8fdc3f (patch) | |
tree | 75c68c1f5b8d7123157821136b6408ed79564c75 /tool | |
parent | f13a00f5b471f0f637c3f165daba235f24083bfc (diff) |
Simplified f13a00f5b4 [ci skip]
Diffstat (limited to 'tool')
-rw-r--r-- | tool/lib/vcs.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/tool/lib/vcs.rb b/tool/lib/vcs.rb index 3c06027ec1..dc7a86a58a 100644 --- a/tool/lib/vcs.rb +++ b/tool/lib/vcs.rb @@ -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) |