aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tool/vcs.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb
index 1d8fe90a78..be7b672d8c 100644
--- a/tool/vcs.rb
+++ b/tool/vcs.rb
@@ -403,6 +403,7 @@ class VCS
(branch = branch_list[0]).strip! unless branch_list.empty?
end
branch.chomp!
+ branch = ":detached:" if branch.empty?
upstream = cmd_read_at(srcdir, [gitcmd + %W[branch --list --format=%(upstream:short) #{branch}]])
upstream.chomp!
title = cmd_read_at(srcdir, [gitcmd + %W[log --format=%s -n1 #{upstream}..HEAD]])