From: Johannes Sixt Date: Wed, 12 Mar 2008 08:30:01 GMT Subject: [PATCH] git-submodule summary: fix that some "wc" flavors produce leading spaces Message-ID: <47D79489.2070004@viscovery.net> In-Reply-To: <1205243539-797-3-git-send-email-pkufranky@gmail.com> From: Johannes Sixt 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 --- 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