repack: place temporary packs under .git/objects/pack/
commite32dfec79f99738df3c2ffca8a9b2257c9b681fb
authorThomas Rast <trast@student.ethz.ch>
Tue, 19 Oct 2010 09:50:43 +0000 (19 11:50 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 19 Oct 2010 16:23:24 +0000 (19 09:23 -0700)
tree7beafa1a16c6a8daee8948d64a95b4c25a88321e
parent87b50542a08ac6caa083ddc376e674424e37940a
repack: place temporary packs under .git/objects/pack/

git-pack-objects is already careful to start out its temporary packs
under .git/objects/pack/ (cf. 8b4eb6b, Do not perform cross-directory
renames when creating packs, 2008-09-22), but git-repack did not
respond in kind so the effort was lost when the filesystem boundary is
exactly at that directory.

Let git-repack pass a path under .git/objects/pack/ as the base for
its temporary packs.

This means we might need the $PACKDIR sooner (before the pack-objects
invocation), so move the mkdir up just to be safe.

Also note that the only use of *.pack is in the find invocation way
before the pack-objects call, so the temporary packs will not suddenly
show up in any wildcards because of the directory change.

Reported-by: Marat Radchenko <marat@slonopotamus.org>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-repack.sh