Permalink
Browse files

Truncate long branch names. Add to tested version list. Version bump.

  • Loading branch information...
1 parent 21fd104 commit b05ec1d2fba3e922e702d51570122eafe893a328 @Pistos committed May 11, 2011
Showing with 11 additions and 2 deletions.
  1. +7 −0 git-branch.rb
  2. +4 −2 info.yaml
View
@@ -7,6 +7,13 @@
if File.exist? dir
branch = Dir.chdir( dir ){ `git symbolic-ref HEAD 2>/dev/null`[ /[^\/\n]+$/ ] }
+ if branch
+ width_max = $diakonos.main_window_width / 4
+ branch_truncated = branch[0..width_max]
+ if branch_truncated != branch
+ branch = branch_truncated[0...-2] << '..'
+ end
+ end
$diakonos.set_status_variable(
'@git_branch',
branch ? " git:#{branch} " : nil
View
@@ -2,8 +2,8 @@ name: git
description: A git extension for Diakonos
author:
name: Pistos
- uri: http://blog.purepistos.net
-version: 1.0.1
+ uri: http://github.com/Pistos
+version: 1.0.2
uris:
homepage: http://github.com/Pistos/dk-git
repository: git://github.com/Pistos/dk-git.git
@@ -15,6 +15,8 @@ requirements:
- 0.8.11
- 0.8.12
- 0.8.13
+ - 0.8.14
+ - 0.8.15
notes: >
This extension provides several git-related features for Diakonos.

0 comments on commit b05ec1d

Please sign in to comment.