Thread (22 messages) flat view 22 messages, 7 authors, 2016-06-15

Re: [PATCH] Add git-filter-branch

From: David Kastrup <hidden>
Date: 2016-06-15 22:43:14

Jonas Fonseca [off-list ref] writes:
quoted hunk ↗ jump to hunk
A possible fix that makes the test pass for me.
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 0c8a7df..5cf9d3c 100644
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -339,7 +339,7 @@ test $commits -eq 0 && die "Found nothing to rewrite"
 
 i=0
 while read commit; do
-	i=$((i+1))
+	i=$(echo i+1 | bc)
Would not work.  You need $i instead.
 	printf "$commit ($i/$commits) "
 
 	git-read-tree -i -m $commit
More portable would be

        i=`expr $i + 1`

since not everything has bc installed.  Is $(...) available generally?
I thought it was a bashism, too.


-- 
David Kastrup
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help