提交 62af0b53 编写于 作者: L Lukas Sandström 提交者: Junio C Hamano

Remove all old packfiles when doing "git repack -a -d"

No point in running git-pack-redundant if we already know
which packs are redundant.
Signed-off-by: NLukas Sandström <lukass@etek.chalmers.se>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 4d16f8de
......@@ -63,9 +63,22 @@ exit
if test "$remove_redundant" = t
then
sync
redundant=$(git-pack-redundant --all)
if test "$redundant" != "" ; then
echo $redundant | xargs rm
if test "$all_into_one" = t
then
cd "$PACKDIR"
existing=`find . -type f \( -name '*.pack' -o -name '*.idx' \) -print`
for e in $existing
do
case "$e" in
./pack-$name.pack | ./pack-$name.idx) ;;
*) rm -f $e ;;
esac
done
else
redundant=$(git-pack-redundant --all)
if test "$redundant" != "" ; then
echo $redundant | xargs rm
fi
fi
fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册