This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 1043781c Get current branch
1043781c is described below

commit 1043781caf5e8aedf13aa33c37c2f20cb9cd2d57
Author: Sebb <[email protected]>
AuthorDate: Tue Aug 27 15:40:52 2024 +0100

    Get current branch
---
 www/status/index.cgi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/www/status/index.cgi b/www/status/index.cgi
index d2795434..f246c351 100755
--- a/www/status/index.cgi
+++ b/www/status/index.cgi
@@ -33,9 +33,9 @@ else
 end
 print "Status: #{summary_status}\r\n\r\n"
 
+git_branch = `git branch --show-current`.strip
 git_info = `git show --format="%h  %ci %cr"  -s HEAD`.strip rescue "?"
-# TODO better format; don't assume we use master
-git_repo = `git ls-remote origin master`.strip rescue "?"
+git_repo = `git ls-remote origin #{git_branch}`.strip rescue "?"
 
 hostname = `hostname`
 
@@ -93,7 +93,7 @@ print <<-EOF
         (ASF member only)</li>
       <li><a href="passenger">Passenger</a> (ASF committer only)</li>
       <li><a href="svn">Subversion</a> (ASF committer only)</li>
-      <li>Git code info: #{git_info}</li>
+      <li>Git code info: #{git_info} (#{git_branch})</li>
       <li>Git repo info: #{git_repo}</li>
     </ul>
   </body>

Reply via email to