From 87261cf59f4914801512cf0f3f1332f0c94b6952 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Mon, 22 Apr 2019 21:44:44 +0900 Subject: [PATCH] Omit last_commit=RUBY_LAST_COMMIT_TITLE without local commits --- tool/vcs.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/vcs.rb b/tool/vcs.rb index d63336ae60..6b72312801 100644 --- a/tool/vcs.rb +++ b/tool/vcs.rb @@ -383,7 +383,7 @@ class VCS changed = log[/\Acommit (\h+)/, 1] modified = log[/^Date:\s+(.*)/, 1] branch = cmd_read_at(srcdir, [gitcmd + %W[symbolic-ref HEAD]])[%r'\A(?:refs/heads/)?(.+)', 1] - title = cmd_read_at(srcdir, [gitcmd + %W[log --format=%s -n1 HEAD]]) + title = cmd_read_at(srcdir, [gitcmd + %W[log --format=%s -n1 FETCH_HEAD..HEAD]]) title = nil if title.empty? [last, changed, modified, branch, title] end