From: Junio C Hamano Date: Wed, 24 Nov 2010 20:47:10 +0000 (-0800) Subject: Merge branch 'tr/maint-git-repack-tmpfile' into maint X-Git-Tag: v1.7.3.3~15 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/0f024aff67e6c97d0a4c797181bdd0e56724c237?ds=inline;hp=-c Merge branch 'tr/maint-git-repack-tmpfile' into maint * tr/maint-git-repack-tmpfile: repack: place temporary packs under .git/objects/pack/ --- 0f024aff67e6c97d0a4c797181bdd0e56724c237 diff --combined git-repack.sh index 769baaf7e1,d21b274de9..624feec26f --- a/git-repack.sh +++ b/git-repack.sh @@@ -10,8 -10,7 +10,8 @@@ git repack [options a pack everything in a single pack A same as -a, and turn unreachable objects loose d remove redundant packs, and run git-prune-packed -f pass --no-reuse-object to git-pack-objects +f pass --no-reuse-delta to git-pack-objects +F pass --no-reuse-object to git-pack-objects n do not run git-update-server-info q,quiet be quiet l pass --local to git-pack-objects @@@ -35,8 -34,7 +35,8 @@@ d unpack_unreachable=--unpack-unreachable ;; -d) remove_redundant=t ;; -q) GIT_QUIET=t ;; - -f) no_reuse=--no-reuse-object ;; + -f) no_reuse=--no-reuse-delta ;; + -F) no_reuse=--no-reuse-object ;; -l) local=--local ;; --max-pack-size|--window|--window-memory|--depth) extra="$extra $1=$2"; shift ;; @@@ -52,7 -50,7 +52,7 @@@ true esac PACKDIR="$GIT_OBJECT_DIRECTORY/pack" - PACKTMP="$GIT_OBJECT_DIRECTORY/.tmp-$$-pack" + PACKTMP="$PACKDIR/.tmp-$$-pack" rm -f "$PACKTMP"-* trap 'rm -f "$PACKTMP"-*' 0 1 2 3 15 @@@ -82,6 -80,8 +82,8 @@@ case ",$all_into_one," i ;; esac + mkdir -p "$PACKDIR" || exit + args="$args $local ${GIT_QUIET:+-q} $no_reuse$extra" names=$(git pack-objects --keep-true-parents --honor-pack-keep --non-empty --all --reflog $args