提交 490e23d2 编写于 作者: J Junio C Hamano

Archive-destroying "git repack -a -d" bug.

Using "git repack -a -d" can destroy your git archive if you use it
twice in succession, because the new pack can be called the same as
the old pack.  Found by Linus.
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 434d036f
......@@ -58,7 +58,15 @@ then
# all-into-one is used.
if test "$all_into_one" != '' && test "$existing" != ''
then
( cd "$PACKDIR" && rm -f $existing )
( cd "$PACKDIR" &&
for e in $existing
do
case "$e" in
./pack-$name.pack | ./pack-$name.idx) ;;
*) rm -f $e ;;
esac
done
)
fi
fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册