зеркало из https://github.com/microsoft/git.git
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>
This commit is contained in:
Родитель
586e4ce248
Коммит
5efb48b5ed
|
@ -164,7 +164,7 @@ test $commits -eq 0 && die "Found nothing to rewrite"
|
||||||
i=0
|
i=0
|
||||||
while read commit parents; do
|
while read commit parents; do
|
||||||
i=$(($i+1))
|
i=$(($i+1))
|
||||||
printf "$commit ($i/$commits) "
|
printf "\rRewrite $commit ($i/$commits)"
|
||||||
|
|
||||||
case "$filter_subdir" in
|
case "$filter_subdir" in
|
||||||
"")
|
"")
|
||||||
|
@ -207,8 +207,8 @@ while read commit parents; do
|
||||||
|
|
||||||
sed -e '1,/^$/d' <../commit | \
|
sed -e '1,/^$/d' <../commit | \
|
||||||
eval "$filter_msg" | \
|
eval "$filter_msg" | \
|
||||||
sh -c "$filter_commit" "git commit-tree" $(git write-tree) $parentstr | \
|
sh -c "$filter_commit" "git commit-tree" $(git write-tree) \
|
||||||
tee ../map/$commit
|
$parentstr > ../map/$commit
|
||||||
done <../revs
|
done <../revs
|
||||||
|
|
||||||
src_head=$(tail -n 1 ../revs | sed -e 's/ .*//')
|
src_head=$(tail -n 1 ../revs | sed -e 's/ .*//')
|
||||||
|
@ -260,6 +260,6 @@ fi
|
||||||
|
|
||||||
cd ../..
|
cd ../..
|
||||||
rm -rf "$tempdir"
|
rm -rf "$tempdir"
|
||||||
echo "Rewritten history saved to the $dstbranch branch"
|
printf "\nRewritten history saved to the $dstbranch branch\n"
|
||||||
|
|
||||||
exit $ret
|
exit $ret
|
||||||
|
|
Загрузка…
Ссылка в новой задаче