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