diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2019-08-25 16:59:45 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2019-08-25 16:59:45 +0900 |
commit | cc6fe1524122ba7d890129c7fdbfd28edba198bf (patch) | |
tree | a6c36cb7b151ce2b8ef9b7cd6f85b8f98eb26ccb /tool | |
parent | 1b03d2d76be48039e8a4d609f36d221077a1daa9 (diff) |
tool/lib/vcs.rb: explicitly fail when notes/commits is not available
Diffstat (limited to 'tool')
-rw-r--r-- | tool/lib/vcs.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tool/lib/vcs.rb b/tool/lib/vcs.rb index 4684b57b28..a55b5815b4 100644 --- a/tool/lib/vcs.rb +++ b/tool/lib/vcs.rb @@ -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| |