{"thread":{"id":"14140","subject":"[PATCH] pack.indexversion config option now defaults to 2","startedAt":"2008-06-25T04:25:53Z","lastAt":"2008-06-25T19:19:46Z","messageCount":10,"participants":["Nicolas Pitre","Linus Torvalds","Junio C Hamano","Mike Hommey"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"81057","messageId":"alpine.LFD.1.10.0806250025130.2979@xanadu.home","threadId":"14140","inReplyTo":null,"subject":"[PATCH] pack.indexversion config option now defaults to 2","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2008-06-25T04:25:53Z","receivedAt":"2008-06-25T04:25:53Z","isPatch":true,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"\nAs announced for 1.6.0.\n\nGit older than version 1.5.2 (or any other git version with this option\nset to 1) may revert to version 1 of the pack index by manually deleting\nall .idx files and recreating them using 'git index-pack'.  Communication\nover the git native protocol is unaffected since the pack index is never\ntransferred.\n\nSigned-off-by: Nicolas Pitre <nico@cam.org>\n---\n Documentation/config.txt |    6 +++---\n pack-write.c             |    2 +-\n 2 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex c7fbc63..f72dd47 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -937,9 +937,9 @@ pack.indexVersion::\n \tlegacy pack index used by Git versions prior to 1.5.2, and 2 for\n \tthe new pack index with capabilities for packs larger than 4 GB\n \tas well as proper protection against the repacking of corrupted\n-\tpacks.  Version 2 is selected and this config option ignored\n-\twhenever the corresponding pack is larger than 2 GB.  Otherwise\n-\tthe default is 1.\n+\tpacks.  Version 2 is the default.  Note that version 2 is enforced\n+\tand this config option ignored whenever the corresponding pack is\n+\tlarger than 2 GB.\n \n pack.packSizeLimit::\n \tThe default maximum size of a pack.  This setting only affects\ndiff --git a/pack-write.c b/pack-write.c\nindex f52cabe..a8f0269 100644\n--- a/pack-write.c\n+++ b/pack-write.c\n@@ -2,7 +2,7 @@\n #include \"pack.h\"\n #include \"csum-file.h\"\n \n-uint32_t pack_idx_default_version = 1;\n+uint32_t pack_idx_default_version = 2;\n uint32_t pack_idx_off32_limit = 0x7fffffff;\n \n static int sha1_compare(const void *_a, const void *_b)\n-- \n1.5.6.56.g29b0d\n"},{"id":"81061","messageId":"alpine.LFD.1.10.0806242130450.22069@hp.linux-foundation.org","threadId":"14140","inReplyTo":"alpine.LFD.1.10.0806250025130.2979@xanadu.home","subject":"Re: [PATCH] pack.indexversion config option now defaults to 2","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-06-25T04:32:49Z","receivedAt":"2008-06-25T04:32:49Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Wed, 25 Jun 2008, Nicolas Pitre wrote:\n> \n> Git older than version 1.5.2 (or any other git version with this option\n> set to 1) may revert to version 1 of the pack index by manually deleting\n> all .idx files and recreating them using 'git index-pack'.  Communication\n> over the git native protocol is unaffected since the pack index is never\n> transferred.\n\nRather than talk about when it does _not_ matter, wouldn't it be better to \ntalk about when it _can_ matter?\n\nNamely when using dumb protocols, either http or rsync, with the other end \nbeing some ancient git thing (and it is worth mentioning version of what \ncounts as 'ancient' too, I can't remember, probably means that pretty much \nnobody else can either).\n\n\t\tLinus\n"},{"id":"81064","messageId":"7vd4m66rfp.fsf@gitster.siamese.dyndns.org","threadId":"14140","inReplyTo":"alpine.LFD.1.10.0806242130450.22069@hp.linux-foundation.org","subject":"Re: [PATCH] pack.indexversion config option now defaults to 2","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-06-25T04:59:06Z","receivedAt":"2008-06-25T04:59:06Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@linux-foundation.org> writes:\n\n> On Wed, 25 Jun 2008, Nicolas Pitre wrote:\n>> \n>> Git older than version 1.5.2 (or any other git version with this option\n>> set to 1) may revert to version 1 of the pack index by manually deleting\n>> all .idx files and recreating them using 'git index-pack'.  Communication\n>> over the git native protocol is unaffected since the pack index is never\n>> transferred.\n>\n> Rather than talk about when it does _not_ matter, wouldn't it be better to \n> talk about when it _can_ matter?\n>\n> Namely when using dumb protocols, either http or rsync, with the other end \n> being some ancient git thing (and it is worth mentioning version of what \n> counts as 'ancient' too, I can't remember, probably means that pretty much \n> nobody else can either).\n\nI agree with you that the description of the change (in the commit log)\nand the instruction (in the documentation) could be more helpful and\nexplicit.\n\nFor the other \"usedeltabaseoffset\" change, I think the insn in the\ndocumentation Nico added is reasonable:\n\n+\tBy default, linkgit:git-repack[1] creates packs that use\n+\tdelta-base offset. If you need to share your repository with\n+\tgit older than version 1.4.4, either directly or via a dumb\n+\tprotocol such as http, then you need to set this option to\n+\t\"false\" and repack. Access from old git versions over the\n+\tnative protocol are unaffected by this option.\n\nexcept perhaps that the \"set false and repack\" should be clarified\nfurther, perhaps like:\n\n\t... then you need to set this option to \"false\" and repack using\n\tgit that is newer than (and including) v1.5.0.\n\nI am basing the above 1.5.0 on description of b6945f5 (git-repack:\nrepo.usedeltabaseoffset, 2006-10-13).\n\nOn the \"indexVersion\" change, the documentation reads:\n\npack.indexVersion::\n\tSpecify the default pack index version.  Valid values are 1 for\n \tlegacy pack index used by Git versions prior to 1.5.2, and 2 for\n \tthe new pack index with capabilities for packs larger than 4 GB\n \tas well as proper protection against the repacking of corrupted\n+\tpacks.  Version 2 is the default.  Note that version 2 is enforced\n+\tand this config option ignored whenever the corresponding pack is\n+\tlarger than 2 GB.\n\nwhich lacks the recovery insn (and it is int strictly the fault of this\npatch, but we should have done this when we introduced the v2 idx).  I\nthink a separate paragraph after the above would be necessary and\nsufficient:\n\n\tIf you have an ancient git that does not understand the version 2\n\t`*.idx` file, cloning or fetching over a non native protocol\n\t(e.g. \"http\" and \"rsync\") which will copy both `*.pack` file and\n\tcorresponding `*.idx` file from the other side may give you a\n\trepository that cannot be accessed with your old git.  If the\n\t`*.pack` file is smaller than 2 GB, however, you can use\n\t`git-index-pack` on the `*.pack` to regenerate the `*.idx` file.\n"},{"id":"81077","messageId":"20080625055605.GD28563@glandium.org","threadId":"14140","inReplyTo":"7vd4m66rfp.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] pack.indexversion config option now defaults to 2","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2008-06-25T05:56:05Z","receivedAt":"2008-06-25T05:56:05Z","isPatch":true,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Tue, Jun 24, 2008 at 09:59:06PM -0700, Junio C Hamano wrote:\n> Linus Torvalds <torvalds@linux-foundation.org> writes:\n> \n> > On Wed, 25 Jun 2008, Nicolas Pitre wrote:\n> >> \n> >> Git older than version 1.5.2 (or any other git version with this option\n> >> set to 1) may revert to version 1 of the pack index by manually deleting\n> >> all .idx files and recreating them using 'git index-pack'.  Communication\n> >> over the git native protocol is unaffected since the pack index is never\n> >> transferred.\n> >\n> > Rather than talk about when it does _not_ matter, wouldn't it be better to \n> > talk about when it _can_ matter?\n> >\n> > Namely when using dumb protocols, either http or rsync, with the other end \n> > being some ancient git thing (and it is worth mentioning version of what \n> > counts as 'ancient' too, I can't remember, probably means that pretty much \n> > nobody else can either).\n> \n> I agree with you that the description of the change (in the commit log)\n> and the instruction (in the documentation) could be more helpful and\n> explicit.\n(...)\n\nWouldn't it be a good idea to add a warning in git update-server-info\nwhen it detects pack.indexVersion is not 1, too ?\n\nMike\n"},{"id":"81078","messageId":"7viqvy59qr.fsf@gitster.siamese.dyndns.org","threadId":"14140","inReplyTo":"20080625055605.GD28563@glandium.org","subject":"Re: [PATCH] pack.indexversion config option now defaults to 2","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-06-25T06:06:36Z","receivedAt":"2008-06-25T06:06:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Mike Hommey <mh@glandium.org> writes:\n\n> Wouldn't it be a good idea to add a warning in git update-server-info\n> when it detects pack.indexVersion is not 1, too ?\n\nCan you describe how that warning will help whom in the bigger picture?\n\nThe way as I understand everybody runs \"git update-server-info\" is:\n\n * \"git push\" pushes into a publishing repository, then\n * \"post-receive\" (or \"post-update\") hook triggers \"update-server-info\".\n\nIf you spit out a warning from update-server-info, it will be shown to the\npusher over sideband, but this will not necessarily help the pusher, who\nmay or may not have shell access to the repository.\n"},{"id":"81081","messageId":"20080625061453.GA32178@glandium.org","threadId":"14140","inReplyTo":"7viqvy59qr.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] pack.indexversion config option now defaults to 2","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2008-06-25T06:14:53Z","receivedAt":"2008-06-25T06:14:53Z","isPatch":true,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Tue, Jun 24, 2008 at 11:06:36PM -0700, Junio C Hamano wrote:\n> Mike Hommey <mh@glandium.org> writes:\n> \n> > Wouldn't it be a good idea to add a warning in git update-server-info\n> > when it detects pack.indexVersion is not 1, too ?\n> \n> Can you describe how that warning will help whom in the bigger picture?\n> \n> The way as I understand everybody runs \"git update-server-info\" is:\n> \n>  * \"git push\" pushes into a publishing repository, then\n>  * \"post-receive\" (or \"post-update\") hook triggers \"update-server-info\".\n> \n> If you spit out a warning from update-server-info, it will be shown to the\n> pusher over sideband, but this will not necessarily help the pusher, who\n> may or may not have shell access to the repository.\n\nThere are also those that get the message to run update-server-info when\ntrying to clone over dumb protocol when the info/refs file is not\nthere... I actually didn't think about the post-receive hook.\n\nWell, then, update-server-info could output the warning only if stderr\nis a tty.\n\nMike\n"},{"id":"81157","messageId":"alpine.LFD.1.10.0806251442500.2979@xanadu.home","threadId":"14140","inReplyTo":"7vd4m66rfp.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] pack.indexversion config option now defaults to 2","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2008-06-25T18:49:20Z","receivedAt":"2008-06-25T18:49:20Z","isPatch":true,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Tue, 24 Jun 2008, Junio C Hamano wrote:\n\n> For the other \"usedeltabaseoffset\" change, I think the insn in the\n> documentation Nico added is reasonable:\n> \n> +\tBy default, linkgit:git-repack[1] creates packs that use\n> +\tdelta-base offset. If you need to share your repository with\n> +\tgit older than version 1.4.4, either directly or via a dumb\n> +\tprotocol such as http, then you need to set this option to\n> +\t\"false\" and repack. Access from old git versions over the\n> +\tnative protocol are unaffected by this option.\n> \n> except perhaps that the \"set false and repack\" should be clarified\n> further, perhaps like:\n> \n> \t... then you need to set this option to \"false\" and repack using\n> \tgit that is newer than (and including) v1.5.0.\n\nActually the first release to support this is v1.4.4 not v1.5.0.\n\n> I am basing the above 1.5.0 on description of b6945f5 (git-repack:\n> repo.usedeltabaseoffset, 2006-10-13).\n\n$ git describe --contains b6945f5\nv1.4.4-rc1~77^2~2\n\n> On the \"indexVersion\" change, the documentation reads:\n> \n> pack.indexVersion::\n> \tSpecify the default pack index version.  Valid values are 1 for\n>  \tlegacy pack index used by Git versions prior to 1.5.2, and 2 for\n>  \tthe new pack index with capabilities for packs larger than 4 GB\n>  \tas well as proper protection against the repacking of corrupted\n> +\tpacks.  Version 2 is the default.  Note that version 2 is enforced\n> +\tand this config option ignored whenever the corresponding pack is\n> +\tlarger than 2 GB.\n> \n> which lacks the recovery insn (and it is int strictly the fault of this\n> patch, but we should have done this when we introduced the v2 idx).  I\n> think a separate paragraph after the above would be necessary and\n> sufficient:\n> \n> \tIf you have an ancient git that does not understand the version 2\n> \t`*.idx` file, cloning or fetching over a non native protocol\n> \t(e.g. \"http\" and \"rsync\") which will copy both `*.pack` file and\n> \tcorresponding `*.idx` file from the other side may give you a\n> \trepository that cannot be accessed with your old git.  If the\n> \t`*.pack` file is smaller than 2 GB, however, you can use\n> \t`git-index-pack` on the `*.pack` to regenerate the `*.idx` file.\n\nLooks fine to me.  Will you amend the patches or do you want me to \nrepost them?\n\n\nNicolas\n"},{"id":"81158","messageId":"alpine.LFD.1.10.0806251449530.2979@xanadu.home","threadId":"14140","inReplyTo":"20080625055605.GD28563@glandium.org","subject":"Re: [PATCH] pack.indexversion config option now defaults to 2","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2008-06-25T18:53:41Z","receivedAt":"2008-06-25T18:53:41Z","isPatch":true,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Wed, 25 Jun 2008, Mike Hommey wrote:\n\n> On Tue, Jun 24, 2008 at 09:59:06PM -0700, Junio C Hamano wrote:\n> > Linus Torvalds <torvalds@linux-foundation.org> writes:\n> > \n> > > On Wed, 25 Jun 2008, Nicolas Pitre wrote:\n> > >> \n> > >> Git older than version 1.5.2 (or any other git version with this option\n> > >> set to 1) may revert to version 1 of the pack index by manually deleting\n> > >> all .idx files and recreating them using 'git index-pack'.  Communication\n> > >> over the git native protocol is unaffected since the pack index is never\n> > >> transferred.\n> > >\n> > > Rather than talk about when it does _not_ matter, wouldn't it be better to \n> > > talk about when it _can_ matter?\n> > >\n> > > Namely when using dumb protocols, either http or rsync, with the other end \n> > > being some ancient git thing (and it is worth mentioning version of what \n> > > counts as 'ancient' too, I can't remember, probably means that pretty much \n> > > nobody else can either).\n> > \n> > I agree with you that the description of the change (in the commit log)\n> > and the instruction (in the documentation) could be more helpful and\n> > explicit.\n> (...)\n> \n> Wouldn't it be a good idea to add a warning in git update-server-info\n> when it detects pack.indexVersion is not 1, too ?\n\nThat would give the idea that index v2 is not good, while what we want \nis to encourage everyone to move to index v2 ASAP.\n\n\nNicolas\n"},{"id":"81159","messageId":"20080625185854.GA4816@glandium.org","threadId":"14140","inReplyTo":"alpine.LFD.1.10.0806251449530.2979@xanadu.home","subject":"Re: [PATCH] pack.indexversion config option now defaults to 2","fromName":"Mike Hommey","fromEmail":"mh@glandium.org","sentAt":"2008-06-25T18:58:54Z","receivedAt":"2008-06-25T18:58:54Z","isPatch":true,"sender":{"key":"mh@glandium.org","avatar":"https://avatars.githubusercontent.com/u/1038527?v=4"},"body":"On Wed, Jun 25, 2008 at 02:53:41PM -0400, Nicolas Pitre wrote:\n> On Wed, 25 Jun 2008, Mike Hommey wrote:\n> \n> > On Tue, Jun 24, 2008 at 09:59:06PM -0700, Junio C Hamano wrote:\n> > > Linus Torvalds <torvalds@linux-foundation.org> writes:\n> > > \n> > > > On Wed, 25 Jun 2008, Nicolas Pitre wrote:\n> > > >> \n> > > >> Git older than version 1.5.2 (or any other git version with this option\n> > > >> set to 1) may revert to version 1 of the pack index by manually deleting\n> > > >> all .idx files and recreating them using 'git index-pack'.  Communication\n> > > >> over the git native protocol is unaffected since the pack index is never\n> > > >> transferred.\n> > > >\n> > > > Rather than talk about when it does _not_ matter, wouldn't it be better to \n> > > > talk about when it _can_ matter?\n> > > >\n> > > > Namely when using dumb protocols, either http or rsync, with the other end \n> > > > being some ancient git thing (and it is worth mentioning version of what \n> > > > counts as 'ancient' too, I can't remember, probably means that pretty much \n> > > > nobody else can either).\n> > > \n> > > I agree with you that the description of the change (in the commit log)\n> > > and the instruction (in the documentation) could be more helpful and\n> > > explicit.\n> > (...)\n> > \n> > Wouldn't it be a good idea to add a warning in git update-server-info\n> > when it detects pack.indexVersion is not 1, too ?\n> \n> That would give the idea that index v2 is not good, while what we want \n> is to encourage everyone to move to index v2 ASAP.\n\nThe warning could just say that people with older git won't be able to\nclone over dumb protocols. Nothing more.\n\nMike\n"},{"id":"81165","messageId":"7vd4m51fvx.fsf@gitster.siamese.dyndns.org","threadId":"14140","inReplyTo":"alpine.LFD.1.10.0806251442500.2979@xanadu.home","subject":"Re: [PATCH] pack.indexversion config option now defaults to 2","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-06-25T19:19:46Z","receivedAt":"2008-06-25T19:19:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nicolas Pitre <nico@cam.org> writes:\n\n> On Tue, 24 Jun 2008, Junio C Hamano wrote:\n> ...\n> Actually the first release to support this is v1.4.4 not v1.5.0.\n>\n>> I am basing the above 1.5.0 on description of b6945f5 (git-repack:\n>> repo.usedeltabaseoffset, 2006-10-13).\n>\n> $ git describe --contains b6945f5\n> v1.4.4-rc1~77^2~2\n\nI know, as I did that myself; but I wanted to be conservative and gave a\nrelease after a major release bump.\n\n>> On the \"indexVersion\" change, the documentation reads:\n>> \n>> pack.indexVersion::\n>> \tSpecify the default pack index version.  Valid values are 1 for\n>>  \tlegacy pack index used by Git versions prior to 1.5.2, and 2 for\n>>  \tthe new pack index with capabilities for packs larger than 4 GB\n>>  \tas well as proper protection against the repacking of corrupted\n>> +\tpacks.  Version 2 is the default.  Note that version 2 is enforced\n>> +\tand this config option ignored whenever the corresponding pack is\n>> +\tlarger than 2 GB.\n>> \n>> which lacks the recovery insn (and it is int strictly the fault of this\n>> patch, but we should have done this when we introduced the v2 idx).  I\n>> think a separate paragraph after the above would be necessary and\n>> sufficient:\n>> \n>> \tIf you have an ancient git that does not understand the version 2\n>> \t`*.idx` file, cloning or fetching over a non native protocol\n>> \t(e.g. \"http\" and \"rsync\") which will copy both `*.pack` file and\n>> \tcorresponding `*.idx` file from the other side may give you a\n>> \trepository that cannot be accessed with your old git.  If the\n>> \t`*.pack` file is smaller than 2 GB, however, you can use\n>> \t`git-index-pack` on the `*.pack` to regenerate the `*.idx` file.\n>\n> Looks fine to me.  Will you amend the patches or do you want me to \n> repost them?\n\nNo worries.  After re-reading what you wrote I think both are fine as they\nare.  I do not mind adding the above 7 lines to the indexVersion one\nmyself.\n"}]}