git-repack: create new packs inside $GIT_DIR, not cwd
commit0ea2582d1cbbacd91eb0f040c4994ecd2bb6cdb9
authorMartin Langhoff <martin@catalyst.net.nz>
Mon, 4 Sep 2006 05:42:32 +0000 (4 17:42 +1200)
committerJunio C Hamano <junkio@cox.net>
Wed, 6 Sep 2006 07:21:57 +0000 (6 00:21 -0700)
treef0b4715b6dd34e8386cb18616b0d8e2be8c6d67e
parent42cabc341c4e6da3c9873db7af1003bd1a72a8fd
git-repack: create new packs inside $GIT_DIR, not cwd

Avoid failing when cwd is !writable by writing the
packfiles in $GIT_DIR, which is more in line with other commands.

Without this, git-repack was failing when run from crontab
by non-root user accounts. For large repositories, this
also makes the mv operation a lot cheaper, and avoids leaving
temp packfiles around the fs upon failure.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-repack.sh