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: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
434d036fe4
commit
490e23d22a
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user