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

tool/lib/vcs.rb: explicitly fail when notes/commits is not available

This commit is contained in:
Yusuke Endoh 2019-08-25 16:59:45 +09:00
parent 1b03d2d76b
commit cc6fe15241

View file

@ -567,6 +567,11 @@ class VCS
warn "no starting commit found", uplevel: 1
from = nil
end
_rev = cmd_read({'LANG' => 'C', 'LC_ALL' => 'C'},
%W"#{COMMAND} show-ref notes/commits")
unless $?.success?
raise "need notes/commits tree; run `git fetch origin refs/notes/commits:refs/notes/commits` in the repository"
end
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|