Merge branch 'np/pack-default'
authorJunio C Hamano <gitster@pobox.com>
Tue, 1 Jul 2008 23:22:07 +0000 (16:22 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 1 Jul 2008 23:22:07 +0000 (16:22 -0700)
* np/pack-default:
pack.indexversion config option now defaults to 2
repack.usedeltabaseoffset config option now defaults to "true"

Documentation/asciidoc.conf
Documentation/config.txt
git-repack.sh
pack-write.c
index 10c1a151a4c38fa594bd83f124f4b654dcfd11e3..40d43b78ee9d6c3827bcf631c1f41f54d0e3dfbc 100644 (file)
@@ -8,6 +8,7 @@
 # the command.
 
 [attributes]
+asterisk=&#42;
 plus=&#43;
 caret=&#94;
 startsb=&#91;
index 6966384cefcb53edb9d74f59139d3b37f849ad23..561ff645f96af3a53a6d43c4d9320090aef623e8 100644 (file)
@@ -945,9 +945,17 @@ pack.indexVersion::
        legacy pack index used by Git versions prior to 1.5.2, and 2 for
        the new pack index with capabilities for packs larger than 4 GB
        as well as proper protection against the repacking of corrupted
-       packs.  Version 2 is selected and this config option ignored
-       whenever the corresponding pack is larger than 2 GB.  Otherwise
-       the default is 1.
+       packs.  Version 2 is the default.  Note that version 2 is enforced
+       and this config option ignored whenever the corresponding pack is
+       larger than 2 GB.
++
+If you have an old git that does not understand the version 2 `{asterisk}.idx` file,
+cloning or fetching over a non native protocol (e.g. "http" and "rsync")
+that will copy both `{asterisk}.pack` file and corresponding `{asterisk}.idx` file from the
+other side may give you a repository that cannot be accessed with your
+older version of git. If the `{asterisk}.pack` file is smaller than 2 GB, however,
+you can use linkgit:git-index-pack[1] on the *.pack file to regenerate
+the `{asterisk}.idx` file.
 
 pack.packSizeLimit::
        The default maximum size of a pack.  This setting only affects
@@ -1004,8 +1012,12 @@ remotes.<group>::
        <group>".  See linkgit:git-remote[1].
 
 repack.usedeltabaseoffset::
-       Allow linkgit:git-repack[1] to create packs that uses
-       delta-base offset.  Defaults to false.
+       By default, linkgit:git-repack[1] creates packs that use
+       delta-base offset. If you need to share your repository with
+       git older than version 1.4.4, either directly or via a dumb
+       protocol such as http, then you need to set this option to
+       "false" and repack. Access from old git versions over the
+       native protocol are unaffected by this option.
 
 showbranch.default::
        The default set of branches for linkgit:git-show-branch[1].
index 072d1b40f7d71aa731c90e9af158a0fe5cf89fde..8c3bc134add87f38a764f24c63b9e09f562ad6b1 100755 (executable)
@@ -44,11 +44,7 @@ do
        shift
 done
 
-# Later we will default repack.UseDeltaBaseOffset to true
-default_dbo=false
-
-case "`git config --bool repack.usedeltabaseoffset ||
-       echo $default_dbo`" in
+case "`git config --bool repack.usedeltabaseoffset || echo true`" in
 true)
        extra="$extra --delta-base-offset" ;;
 esac
index f52cabe83829289dee7e44673b59a02db38918a5..a8f02699366c87de960d7637e9f69c26c2241693 100644 (file)
@@ -2,7 +2,7 @@
 #include "pack.h"
 #include "csum-file.h"
 
-uint32_t pack_idx_default_version = 1;
+uint32_t pack_idx_default_version = 2;
 uint32_t pack_idx_off32_limit = 0x7fffffff;
 
 static int sha1_compare(const void *_a, const void *_b)