In 6a9d16a (filter-branch: add passed/remaining seconds on progress,
2015-09-07) we introduced a new style to write $((...) expressions: with
spaces in the arithmetic expression. We actually introduced *two* new
styles, even: some of the $((...)) expressions had spaces after the two
opening and before the two closing parentheses, but others did not.

There had been an arithmetic expression in that script, though, and it
matched the coding style of the rest of Git's source code: $((...))
expressions simply do not contain spaces.

Let's adjust the style to the previously existing code.

Cc: Gabor Bernat <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
---
 git-filter-branch.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 86b2ff1..1067785 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -283,13 +283,13 @@ report_progress ()
                count=$git_filter_branch__commit_count
 
                now=$(date +%s)
-               elapsed=$(($now - $start_timestamp))
-               remaining=$(( ($commits - $count) * $elapsed / $count ))
+               elapsed=$(($now-$start_timestamp))
+               remaining=$((($commits-$count)*$elapsed/$count))
                if test $elapsed -gt 0
                then
-                       next_sample_at=$(( ($elapsed + 1) * $count / $elapsed ))
+                       next_sample_at=$((($elapsed+1)*$count/$elapsed))
                else
-                       next_sample_at=$(($next_sample_at + 1))
+                       next_sample_at=$(($next_sample_at+1))
                fi
                progress=" ($elapsed seconds passed, remaining $remaining 
predicted)"
        fi
-- 
2.7.0.windows.1.7.g55a05c8


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to