filter-branch: make output nicer
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>
Johannes Schindelin committed
Jul 4, 2007 at 15:33 UTC
5efb48b5ed7dd6838962a7b25845c6d8e2d40422
1 file changed
+4
-4
git-filter-branch.sh
+4
-4
@@ -164,7 +164,7 @@ test $commits -eq 0 && die "Found nothing to rewrite"
164
i=0
165
while read commit parents; do
166
i=$(($i+1))
167
- printf "$commit ($i/$commits) "
167
+ printf "\rRewrite $commit ($i/$commits)"
168
169
case "$filter_subdir" in
170
"")
@@ -207,8 +207,8 @@ while read commit parents; do
207
208
sed -e '1,/^$/d' <../commit | \
209
eval "$filter_msg" | \
210
- sh -c "$filter_commit" "git commit-tree" $(git write-tree) $parentstr | \
211
- tee ../map/$commit
210
+ sh -c "$filter_commit" "git commit-tree" $(git write-tree) \
211
+ $parentstr > ../map/$commit
212
done <../revs
213
214
src_head=$(tail -n 1 ../revs | sed -e 's/ .*//')
@@ -260,6 +260,6 @@ fi
260
261
cd ../..
262
rm -rf "$tempdir"
263
-echo "Rewritten history saved to the $dstbranch branch"
263
+printf "\nRewritten history saved to the $dstbranch branch\n"
264
265
exit $ret