Skip to content

Commit

Permalink
filter-branch: make output nicer
Browse files Browse the repository at this point in the history
Instead of filling the screen with progress lines, use \r so that
the progress can be seen, but warning messages are more visible.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Jul 4, 2007
1 parent 586e4ce commit 5efb48b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions git-filter-branch.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ test $commits -eq 0 && die "Found nothing to rewrite"
i=0
while read commit parents; do
i=$(($i+1))
printf "$commit ($i/$commits) "
printf "\rRewrite $commit ($i/$commits)"

case "$filter_subdir" in
"")
Expand Down Expand Up @@ -207,8 +207,8 @@ while read commit parents; do

sed -e '1,/^$/d' <../commit | \
eval "$filter_msg" | \
sh -c "$filter_commit" "git commit-tree" $(git write-tree) $parentstr | \
tee ../map/$commit
sh -c "$filter_commit" "git commit-tree" $(git write-tree) \
$parentstr > ../map/$commit
done <../revs

src_head=$(tail -n 1 ../revs | sed -e 's/ .*//')
Expand Down Expand Up @@ -260,6 +260,6 @@ fi

cd ../..
rm -rf "$tempdir"
echo "Rewritten history saved to the $dstbranch branch"
printf "\nRewritten history saved to the $dstbranch branch\n"

exit $ret

0 comments on commit 5efb48b

Please sign in to comment.