Permalink
Browse files

Better (less complex) way of counting the branch name length.

  • Loading branch information...
1 parent 6884523 commit b673c44595db6ffce1fcae50d122771bbf8360b5 @nvie committed Feb 9, 2010
Showing with 3 additions and 3 deletions.
  1. +1 −1 git-flow-hotfix
  2. +1 −1 git-flow-release
  3. +1 −1 git-flow-support
View
@@ -44,7 +44,7 @@ cmd_list() {
typeset -i width=0
typeset branch
for branch in $short_names; do
- typeset -i len=$(($(echo "$branch" | wc -c) - 1))
+ typeset -i len=${#branch}
width=$(max $width $len)
done
width=width+3
View
@@ -56,7 +56,7 @@ cmd_list() {
typeset -i width=0
typeset branch
for branch in $short_names; do
- typeset -i len=$(($(echo "$branch" | wc -c) - 1))
+ typeset -i len=${#branch}
width=$(max $width $len)
done
width=width+3
View
@@ -46,7 +46,7 @@ cmd_list() {
typeset -i width=0
typeset branch
for branch in $short_names; do
- typeset -i len=$(($(echo "$branch" | wc -c) - 1))
+ typeset -i len=${#branch}
width=$(max $width $len)
done
width=width+3

0 comments on commit b673c44

Please sign in to comment.