From: David Kastrup Date: Tue, 05 Jun 2007 10:26:08 GMT Subject: Re: [PATCH] Add git-filter-branch Message-ID: <868xayofy7.fsf@lola.quinscape.zz> In-Reply-To: <20070605101845.GA16160@diku.dk> Jonas Fonseca writes: > 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