]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
+ show relative timestamp in git version
authordmitry kim <jason@nichego.net>
Thu, 10 Apr 2008 18:26:24 +0000 (22:26 +0400)
committerdmitry kim <jason@nichego.net>
Thu, 10 Apr 2008 18:26:24 +0000 (22:26 +0400)
bin/rbot

index ed6b57f85c93181420764494057d49f3326fe18a..37b73e5088b7d1622e24db38d928a10dd5c3191f 100755 (executable)
--- a/bin/rbot
+++ b/bin/rbot
@@ -75,9 +75,9 @@ if $version =~ /git/
         branch = $1.dup || "unknown"
         changed = git_out.match(/^# Change(.*)\n/)
         rev = "revision "
-        git_out = `git log -1 --pretty=format:"%h%n%b"`.split("\n")
-        rev << git_out.first
-        if git_out.last.match(/^git-svn-id: \S+@(\d+)/)
+        git_out = `git log -1 --pretty=format:"%h%n%b%n%cr"`.split("\n")
+        rev << git_out.first << ' [' << git_out.last << ']'
+        if git_out[1].match(/^git-svn-id: \S+@(\d+)/)
           rev << "(svn #{$1})"
         end
         rev << ", local changes" if changed