ruby-changes:55691
From: Nobuyoshi <ko1@a...>
Date: Thu, 9 May 2019 16:57:14 +0900 (JST)
Subject: [ruby-changes:55691] Nobuyoshi Nakada: 025206d0dd (trunk): Fallback to an invalid branch name if no branch found
https://git.ruby-lang.org/ruby.git/commit/?id=025206d0dd From 025206d0dd29266771f166eb4f59609af602213a Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 9 May 2019 14:11:43 +0900 Subject: Fallback to an invalid branch name if no branch found diff --git a/tool/vcs.rb b/tool/vcs.rb index 1d8fe90..be7b672 100644 --- a/tool/vcs.rb +++ b/tool/vcs.rb @@ -403,6 +403,7 @@ class VCS https://github.com/ruby/ruby/blob/trunk/tool/vcs.rb#L403 (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]]) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/