Skip to content

Commit

Permalink
Better (less complex) way of counting the branch name length.
Browse files Browse the repository at this point in the history
  • Loading branch information
nvie committed Feb 9, 2010
1 parent 6884523 commit b673c44
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion git-flow-hotfix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion git-flow-release
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion git-flow-support
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b673c44

Please sign in to comment.