[PATCH 2/3] rebase--interactive: adjust the coding style of $((...))
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 4, 2016, 12:02 UTC
- Message-ID
- <dbd8ee3b1de55b7414c91bf203be2aaa77b78822.1454587284.git.johannes.schindelin@gmx.de>
- In-Reply-To
- <cover.1454587284.git.johannes.schindelin@gmx.de>
In 180bad3 (rebase -i: respect core.commentchar, 2013-02-11) we changed the coding style of an arithmetic expression to introduce spaces. The existing $((...)) expression did not use that convention, though, and neither was it the habit of the other shell scripts in Git's source code.
Later, 1db168e (rebase-i: loosen over-eager check_bad_cmd check, 2015-10-01) repeated the same coding style, again not matching the rest of the source code's style.
Let's make the coding style consistent again.
Cc: John Keeping <john@keeping.me.uk> Cc: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> --- git-rebase--interactive.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index c0cfe88..3e2bd1b 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -122,7 +122,7 @@ mark_action_done () { mv -f "$todo".new "$todo" new_count=$(git stripspace --strip-comments <"$done" | wc -l) echo $new_count >"$msgnum" - total=$(($new_count + $(git stripspace --strip-comments <"$todo" | wc -l))) + total=$(($new_count+$(git stripspace --strip-comments <"$todo" | wc -l))) echo $total >"$end" if test "$last_count" != "$new_count" then @@ -895,7 +895,7 @@ check_bad_cmd_and_sha () { lineno=0 while read -r command rest do - lineno=$(( $lineno + 1 )) + lineno=$(($lineno+1)) case $command in "$comment_char"*|''|noop|x|exec) # Doesn't expect a SHA-1
-- 2.7.0.windows.1.7.g55a05c8