diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-01-22 23:29:50 +0100 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-01-23 01:07:40 +0100 |
commit | 5a70ef6befc3b74e21033f208be86d5aa0255d98 (patch) | |
tree | 905e51f6bcfb5d470a8f39990348a8fe788a1b9a /launch_here.rb | |
parent | 375490bad45a77cb90d6a38b2d673fbead34e4fe (diff) |
launch_here: add commit subject rather than svn id to revision
There are no git-svn-ids in our repository, so don't look for them.
Instead, put the last commit subject next to the revision to ease
identification of the commit.
Diffstat (limited to 'launch_here.rb')
-rwxr-xr-x | launch_here.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/launch_here.rb b/launch_here.rb index 6f9de4bf..e1e4a011 100755 --- a/launch_here.rb +++ b/launch_here.rb @@ -22,10 +22,12 @@ begin branch = $1.dup || "unknown" changed = git_out.match(/^# Change(.*)\n/) rev = "revision " - git_out = `git log -1 --pretty=format:"%h%n%b%n%ct"`.split("\n") + git_out = `git log -1 --pretty=format:"%h%n%s%n%ct"`.split("\n") rev << git_out.first + subject = git_out[1].strip + subject[77,subject.length] = "..." if subject.length > 80 + rev << " [#{subject}]" unless subject.empty? $version_timestamp = git_out.last.to_i - rev << "(svn #{$1})" if git_out[1].match(/^git-svn-id: \S+@(\d+)/) rev << ", local changes" if changed else # older gits git_out = `git branch` |