Skip to content

Commit a08ca90

Browse files
committed
Merge branch 'np/pack-default'
* np/pack-default: pack.indexversion config option now defaults to 2 repack.usedeltabaseoffset config option now defaults to "true"
2 parents 9d54ea6 + c0a5e2d commit a08ca90

File tree

4 files changed

+20
-11
lines changed

4 files changed

+20
-11
lines changed

Documentation/asciidoc.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
# the command.
99

1010
[attributes]
11+
asterisk=*
1112
plus=+
1213
caret=^
1314
startsb=[

Documentation/config.txt

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -945,9 +945,17 @@ pack.indexVersion::
945945
legacy pack index used by Git versions prior to 1.5.2, and 2 for
946946
the new pack index with capabilities for packs larger than 4 GB
947947
as well as proper protection against the repacking of corrupted
948-
packs. Version 2 is selected and this config option ignored
949-
whenever the corresponding pack is larger than 2 GB. Otherwise
950-
the default is 1.
948+
packs. Version 2 is the default. Note that version 2 is enforced
949+
and this config option ignored whenever the corresponding pack is
950+
larger than 2 GB.
951+
+
952+
If you have an old git that does not understand the version 2 `{asterisk}.idx` file,
953+
cloning or fetching over a non native protocol (e.g. "http" and "rsync")
954+
that will copy both `{asterisk}.pack` file and corresponding `{asterisk}.idx` file from the
955+
other side may give you a repository that cannot be accessed with your
956+
older version of git. If the `{asterisk}.pack` file is smaller than 2 GB, however,
957+
you can use linkgit:git-index-pack[1] on the *.pack file to regenerate
958+
the `{asterisk}.idx` file.
951959

952960
pack.packSizeLimit::
953961
The default maximum size of a pack. This setting only affects
@@ -1004,8 +1012,12 @@ remotes.<group>::
10041012
<group>". See linkgit:git-remote[1].
10051013

10061014
repack.usedeltabaseoffset::
1007-
Allow linkgit:git-repack[1] to create packs that uses
1008-
delta-base offset. Defaults to false.
1015+
By default, linkgit:git-repack[1] creates packs that use
1016+
delta-base offset. If you need to share your repository with
1017+
git older than version 1.4.4, either directly or via a dumb
1018+
protocol such as http, then you need to set this option to
1019+
"false" and repack. Access from old git versions over the
1020+
native protocol are unaffected by this option.
10091021

10101022
showbranch.default::
10111023
The default set of branches for linkgit:git-show-branch[1].

git-repack.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,7 @@ do
4444
shift
4545
done
4646

47-
# Later we will default repack.UseDeltaBaseOffset to true
48-
default_dbo=false
49-
50-
case "`git config --bool repack.usedeltabaseoffset ||
51-
echo $default_dbo`" in
47+
case "`git config --bool repack.usedeltabaseoffset || echo true`" in
5248
true)
5349
extra="$extra --delta-base-offset" ;;
5450
esac

pack-write.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include "pack.h"
33
#include "csum-file.h"
44

5-
uint32_t pack_idx_default_version = 1;
5+
uint32_t pack_idx_default_version = 2;
66
uint32_t pack_idx_off32_limit = 0x7fffffff;
77

88
static int sha1_compare(const void *_a, const void *_b)

0 commit comments

Comments
 (0)