aboutsummaryrefslogtreecommitdiff
path: root/git-repack.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-10-13 21:28:58 -0700
committerJunio C Hamano <junkio@cox.net>2006-10-13 21:28:58 -0700
commitb6945f570acef7603c58d2aec4a84dce006fbd65 (patch)
tree68b684e36334f4bb05bc114a3a429388be62fe5b /git-repack.sh
parent63fba759bc1d9405f362e73918096815bf8e2a15 (diff)
downloadgit-b6945f570acef7603c58d2aec4a84dce006fbd65.tar.gz
git-b6945f570acef7603c58d2aec4a84dce006fbd65.tar.xz
git-repack: repo.usedeltabaseoffset
When configuration variable `repack.UseDeltaBaseOffset` is set for the repository, the command passes `--delta-base-offset` option to `git-pack-objects`; this typically results in slightly smaller packs, but the generated packs are incompatible with versions of git older than (and including) v1.4.3. We will make it default to true sometime in the future, but not for a while. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-repack.sh')
-rwxr-xr-xgit-repack.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/git-repack.sh b/git-repack.sh
index b525fc5df..2a214891a 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -3,7 +3,7 @@
# Copyright (c) 2005 Linus Torvalds
#
-USAGE='[-a] [-d] [-f] [-l] [-n] [-q]'
+USAGE='[-a] [-d] [-f] [-l] [-n] [-q] [--window=N] [--depth=N]'
. git-sh-setup
no_update_info= all_into_one= remove_redundant=
@@ -24,6 +24,15 @@ do
shift
done
+# Later we will default repack.UseDeltaBaseOffset to true
+default_dbo=false
+
+case "`git repo-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"
rm -f "$PACKTMP"-*