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>
Junio C Hamano committed
Oct 13, 2006 at 21:28 UTC
b6945f570acef7603c58d2aec4a84dce006fbd65
3 files changed
+28
-1
Documentation/config.txt
+4
@@ -224,6 +224,10 @@ pull.octopus::
224
pull.twohead::
225
The default merge strategy to use when pulling a single branch.
226
227
+repack.usedeltabaseoffset::
228
+ Allow gitlink:git-repack[1] to create packs that uses
229
+ delta-base offset. Defaults to false.
230
+
231
show.difftree::
232
The default gitlink:git-diff-tree[1] arguments to be used
233
for gitlink:git-show[1].
Documentation/git-repack.txt
+14
@@ -66,6 +66,20 @@ OPTIONS
66
to be applied that many times to get to the necessary object.
67
68
69
+Configuration
70
+-------------
71
+
72
+When configuration variable `repack.UseDeltaBaseOffset` is set
73
+for the repository, the command passes `--delta-base-offset`
74
+option to `git-pack-objects`; this typically results in slightly
75
+smaller packs, but the generated packs are incompatible with
76
+versions of git older than (and including) v1.4.3; do not set
77
+the variable in a repository that older version of git needs to
78
+be able to read (this includes repositories from which packs can
79
+be copied out over http or rsync, and people who obtained packs
80
+that way can try to use older git with it).
81
+
82
+
83
Author
84
------
85
Written by Linus Torvalds <torvalds@osdl.org>
git-repack.sh
+10
-1
@@ -3,7 +3,7 @@
3
# Copyright (c) 2005 Linus Torvalds
4
#
5
6
-USAGE='[-a] [-d] [-f] [-l] [-n] [-q]'
6
+USAGE='[-a] [-d] [-f] [-l] [-n] [-q] [--window=N] [--depth=N]'
7
. git-sh-setup
8
9
no_update_info= all_into_one= remove_redundant=
@@ -24,6 +24,15 @@ do
24
shift
25
done
26
27
+# Later we will default repack.UseDeltaBaseOffset to true
28
+default_dbo=false
29
+
30
+case "`git repo-config --bool repack.usedeltabaseoffset ||
31
+ echo $default_dbo`" in
32
+true)
33
+ extra="$extra --delta-base-offset" ;;
34
+esac
35
+
36
PACKDIR="$GIT_OBJECT_DIRECTORY/pack"
37
PACKTMP="$GIT_DIR/.tmp-$$-pack"
38
rm -f "$PACKTMP"-*