git-filter-branch: avoid collisions with variables in eval'ed commands
Avoid using simple variable names like 'i', since user commands are eval'ed and may clash with and overwrite our values. Signed-off-by: Elijah Newren <newren@gmail.com> Acked-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren committed
Mar 25, 2009 at 15:51 UTC
d5b0c97d138201c59b30cb759cedabb70b7bae81
1 file changed
+3
-3
git-filter-branch.sh
+3
-3
@@ -272,10 +272,10 @@ test $commits -eq 0 && die "Found nothing to rewrite"
272
273
# Rewrite the commits
274
275
-i=0
275
+git_filter_branch__commit_count=0
276
while read commit parents; do
277
- i=$(($i+1))
278
- printf "\rRewrite $commit ($i/$commits)"
277
+ git_filter_branch__commit_count=$(($git_filter_branch__commit_count+1))
278
+ printf "\rRewrite $commit ($git_filter_branch__commit_count/$commits)"
279
280
case "$filter_subdir" in
281
"")