X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-repack.sh;h=8c32724be75b77f145106f96257afccb56cfc1ef;hb=a2f8028d3d661b314d5a784764f2f5f9e4c2dde0;hp=f150a558ca7a7a659f4eb88be3a275e1a4e87337;hpb=3fbe2d54d7d91378934df7b16d70dc5877586fae;p=git.git diff --git a/git-repack.sh b/git-repack.sh index f150a558c..8c32724be 100755 --- a/git-repack.sh +++ b/git-repack.sh @@ -3,12 +3,12 @@ # Copyright (c) 2005 Linus Torvalds # -USAGE='[-a] [-d] [-f] [-l] [-n] [-q] [--window=N] [--depth=N]' +USAGE='[-a] [-d] [-f] [-l] [-n] [-q] [--max-pack-size=N] [--window=N] [--depth=N]' SUBDIRECTORY_OK='Yes' . git-sh-setup no_update_info= all_into_one= remove_redundant= -local= quiet= no_reuse_delta= extra= +local= quiet= no_reuse= extra= while case "$#" in 0) break ;; esac do case "$1" in @@ -16,8 +16,9 @@ do -a) all_into_one=t ;; -d) remove_redundant=t ;; -q) quiet=-q ;; - -f) no_reuse_delta=--no-reuse-delta ;; + -f) no_reuse=--no-reuse-object ;; -l) local=--local ;; + --max-pack-size=*) extra="$extra $1" ;; --window=*) extra="$extra $1" ;; --depth=*) extra="$extra $1" ;; *) usage ;; @@ -28,14 +29,14 @@ done # Later we will default repack.UseDeltaBaseOffset to true default_dbo=false -case "`git repo-config --bool repack.usedeltabaseoffset || +case "`git config --bool repack.usedeltabaseoffset || echo $default_dbo`" in true) extra="$extra --delta-base-offset" ;; esac PACKDIR="$GIT_OBJECT_DIRECTORY/pack" -PACKTMP="$GIT_DIR/.tmp-$$-pack" +PACKTMP="$GIT_OBJECT_DIRECTORY/.tmp-$$-pack" rm -f "$PACKTMP"-* trap 'rm -f "$PACKTMP"-*' 0 1 2 3 15 @@ -61,12 +62,16 @@ case ",$all_into_one," in ;; esac -args="$args $local $quiet $no_reuse_delta$extra" -name=$(git-pack-objects --non-empty --all $args