mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Export all commits as ChangeLog when no starting commit is found [ci skip]
This commit is contained in:
parent
04735c48ab
commit
f13a00f5b4
1 changed files with 10 additions and 3 deletions
|
@ -573,10 +573,17 @@ class VCS
|
|||
end
|
||||
rev unless rev.empty?
|
||||
end
|
||||
unless /./.match(from ||= branch_beginning(url))
|
||||
if /./.match(from) or /./.match(from = branch_beginning(url))
|
||||
from += "^"
|
||||
else
|
||||
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
|
||||
range = [from, (to || 'HEAD')].join('^..')
|
||||
end
|
||||
range = [from, (to || 'HEAD')].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)
|
||||
|
|
Loading…
Reference in a new issue