ruby-changes:57246
From: Yusuke <ko1@a...>
Date: Sun, 25 Aug 2019 17:01:47 +0900 (JST)
Subject: [ruby-changes:57246] Yusuke Endoh: cc6fe15241 (master): tool/lib/vcs.rb: explicitly fail when notes/commits is not available
https://git.ruby-lang.org/ruby.git/commit/?id=cc6fe15241 From cc6fe1524122ba7d890129c7fdbfd28edba198bf Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Sun, 25 Aug 2019 16:59:45 +0900 Subject: tool/lib/vcs.rb: explicitly fail when notes/commits is not available diff --git a/tool/lib/vcs.rb b/tool/lib/vcs.rb index 4684b57..a55b581 100644 --- a/tool/lib/vcs.rb +++ b/tool/lib/vcs.rb @@ -567,6 +567,11 @@ class VCS https://github.com/ruby/ruby/blob/trunk/tool/lib/vcs.rb#L567 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| -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/