Subject: [PATCH] git-submodule summary: fix that some "wc" flavors produce leading spaces

From: Johannes Sixt <[email-masked]>
Date: Wed, 12 Mar 2008 09:30:01 +0100

From: Johannes Sixt <[email-masked]>

We print the number of commits in parentheses, but without this change
we would get an oddly looking line like this:

    * sm1 4c8d358...41fbea9 (      4):

Signed-off-by: Johannes Sixt <[email-masked]>
---

	How portable is this?

	-- Hannes

 git-submodule.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-submodule.sh b/git-submodule.sh
index f7a6ee2..221a4c8 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -462,7 +462,7 @@ cmd_summary() {
 			GIT_DIR="$name/.git" \
 			git log --pretty=oneline --first-parent $range | wc -l
 			)
-			total_commits=" ($total_commits)"
+			total_commits=" ($(($total_commits + 0)))"
 			;;
 		esac

-- 
1.5.4.4.1329.g2c612