You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by Sebastian Bazley <se...@apache.org> on 2016/04/01 18:23:28 UTC

[whimsy.git] [1/1] Commit 906da86: Show the remote repo info

Commit 906da86811344bf479f159b194db56961bc2f81e:
    Show the remote repo info


Branch: refs/heads/master
Author: Sebb <se...@apache.org>
Committer: Sebb <se...@apache.org>
Pusher: sebb <se...@apache.org>

------------------------------------------------------------
www/status/index.cgi                                         | +++ 
------------------------------------------------------------
3 changes: 3 additions, 0 deletions.
------------------------------------------------------------


diff --git a/www/status/index.cgi b/www/status/index.cgi
index 040b111..1716f1f 100755
--- a/www/status/index.cgi
+++ b/www/status/index.cgi
@@ -5,6 +5,8 @@ require 'time'
 json = File.expand_path('../status.json', __FILE__)
 status = JSON.parse(File.read(json)) rescue {}
 git_info = `git show --format="%h  %ci"  -s HEAD`.strip rescue "?"
+# TODO better format; don't assume we use master
+git_repo = `git ls-remote origin master`.strip rescue "?"
 
 # Get new status every minute
 if not status['mtime'] or Time.now - Time.parse(status['mtime']) > 60
@@ -64,6 +66,7 @@ print <<-EOF
       <li><a href="passenger">Passenger</a> (ASF committer only)</li>
       <li><a href="svn">Subversion</a></li>
       <li>Git code info: #{git_info}</li>
+      <li>Git repo info: #{git_repo}</li>
     </ul>
   </body>
 </html>