From 6cad0644248d5acbaf3a2e8de4ff6d88b3dd2cb4 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 15 Sep 2019 16:23:33 +0900 Subject: Try to fetch commits notes to the source tree automatically [Bug #16167] --- tool/lib/vcs.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tool/lib') diff --git a/tool/lib/vcs.rb b/tool/lib/vcs.rb index f8b78bc2f6..924dfe327a 100644 --- a/tool/lib/vcs.rb +++ b/tool/lib/vcs.rb @@ -607,10 +607,9 @@ 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" + unless system(*%W"#{COMMAND} fetch origin refs/notes/commits:refs/notes/commits", + chdir: @srcdir, exception: false) + abort "Could not fetch notes/commits tree" end to ||= 'HEAD' if from -- cgit v1.2.3