[PATCH 3/3] rebase --merge: adjust $((...)) coding style
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 4, 2016, 12:03 UTC
- Message-ID
- <6c243cf13271ed285409063e501ec67c19df767d.1454587284.git.johannes.schindelin@gmx.de>
- In-Reply-To
- <cover.1454587284.git.johannes.schindelin@gmx.de>
In 58634db (rebase: Allow merge strategies to be used when rebasing, 2006-06-21) we introduced $((...)) expressions containing spaces, disagreeing with Git's existing source code's convention.
Naturally, 0bb733c (Use branch names in 'git-rebase -m' conflict hunks., 2006-12-28) repeated the convention set forth in git-rebase--merge.sh.
Let's make the coding style consistent again.
Cc: Eric Wong <normalperson@yhbt.net> Cc: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> --- git-rebase--merge.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/git-rebase--merge.sh b/git-rebase--merge.sh index 2cc2a6d..a9bd39a 100644 --- a/git-rebase--merge.sh +++ b/git-rebase--merge.sh @@ -48,7 +48,7 @@ continue_merge () { GIT_PAGER='' git log --format=%s -1 "$cmt" # onto the next patch: - msgnum=$(($msgnum + 1)) + msgnum=$(($msgnum+1)) echo "$msgnum" >"$state_dir/msgnum" } @@ -59,7 +59,7 @@ call_merge () { echo "$cmt" > "$state_dir/current" hd=$(git rev-parse --verify HEAD) cmt_name=$(git symbolic-ref HEAD 2> /dev/null || echo HEAD) - eval GITHEAD_$cmt='"${cmt_name##refs/heads/}~$(($end - $msgnum))"' + eval GITHEAD_$cmt='"${cmt_name##refs/heads/}~$(($end-$msgnum))"' eval GITHEAD_$hd='$onto_name' export GITHEAD_$cmt GITHEAD_$hd if test -n "$GIT_QUIET" @@ -126,7 +126,7 @@ continue) skip) read_state git rerere clear - msgnum=$(($msgnum + 1)) + msgnum=$(($msgnum+1)) while test "$msgnum" -le "$end" do call_merge "$msgnum" @@ -144,7 +144,7 @@ write_basic_state msgnum=0 for cmt in $(git rev-list --reverse --no-merges "$revisions") do - msgnum=$(($msgnum + 1)) + msgnum=$(($msgnum+1)) echo "$cmt" > "$state_dir/cmt.$msgnum" done
-- 2.7.0.windows.1.7.g55a05c8