{"thread":{"id":"52982","subject":"[Question] Is extensions.partialClone defunct?","startedAt":"2020-03-12T12:23:52Z","lastAt":"2021-06-05T13:02:12Z","messageCount":13,"participants":["Derrick Stolee","Jonathan Tan","Jonathan Nieder","Junio C Hamano","Taylor Blau","Jeff King","Christian Couder","Tao Klerks"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"393123","messageId":"5981c317-4b39-de15-810b-a781aa79189d@gmail.com","threadId":"52982","inReplyTo":null,"subject":"[Question] Is extensions.partialClone defunct?","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2020-03-12T12:23:45Z","receivedAt":"2020-03-12T12:23:52Z","isPatch":false,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"I was looking into an issue around partial clone in v2.26.0-rc1, but found several references in the code and documentation to \"extensions.partialClone\".\n\nHere is the blurb from Documentation/technical/repository-version.txt:\n\n  ==== `partialclone`\n\n  When the config key `extensions.partialclone` is set, it indicates\n  that the repo was created with a partial clone (or later performed\n  a partial fetch) and that the remote may have omitted sending\n  certain unwanted objects.  Such a remote is called a \"promisor remote\"\n  and it promises that all such omitted objects can be fetched from it\n  in the future.\n\n  The value of this key is the name of the promisor remote.\n\nand this error message in builtin/fetch.c:\n\n\tif (filter_options.choice && !has_promisor_remote())\n\t\tdie(\"--filter can only be used when extensions.partialClone is set\");\n\nbut it appears that we rely on the \"remote.<name>.promisor = true\" setting instead of this extension.\n\nIndeed, if we run `git clone --filter=blob:none <url>\" the resulting .git/config file is as follows:\n\n[core]\n        repositoryformatversion = 1\n        filemode = false\n        bare = false\n        logallrefupdates = true\n        symlinks = false\n        ignorecase = true\n[remote \"origin\"]\n        url = <url>\n        fetch = +refs/heads/*:refs/remotes/origin/*\n        promisor = true\n        partialclonefilter = blob:none\n[branch \"master\"]\n        remote = origin\n        merge = refs/heads/master\n\nSo, I thought I would put this up on the list to point out the inconsistency, in case someone with more context has thoughts on the correct way forward here.\n\nThanks,\n-Stolee\n"},{"id":"393138","messageId":"20200312170714.180996-1-jonathantanmy@google.com","threadId":"52982","inReplyTo":"5981c317-4b39-de15-810b-a781aa79189d@gmail.com","subject":"Re: [Question] Is extensions.partialClone defunct?","fromName":"Jonathan Tan","fromEmail":"jonathantanmy@google.com","sentAt":"2020-03-12T17:07:14Z","receivedAt":"2020-03-12T17:07:25Z","isPatch":false,"sender":{"key":"jonathantanmy@fastmail.com","avatar":null},"body":"> I was looking into an issue around partial clone in v2.26.0-rc1, but found several references in the code and documentation to \"extensions.partialClone\".\n\n[snip]\n\n> but it appears that we rely on the \"remote.<name>.promisor = true\" setting instead of this extension.\n\nHmm...besides giving the name of the promisor remote, the\nextensions.partialClone setting is there to prevent old versions of Git\n(that do not know this extension) from manipulating the repo.\n\n> Indeed, if we run `git clone --filter=blob:none <url>\" the resulting .git/config file is as follows:\n> \n> [core]\n>         repositoryformatversion = 1\n>         filemode = false\n>         bare = false\n>         logallrefupdates = true\n>         symlinks = false\n>         ignorecase = true\n> [remote \"origin\"]\n>         url = <url>\n>         fetch = +refs/heads/*:refs/remotes/origin/*\n>         promisor = true\n>         partialclonefilter = blob:none\n> [branch \"master\"]\n>         remote = origin\n>         merge = refs/heads/master\n\nI cloned and indeed it is as Stolee describes. Git still works as\nexpected if I remove \"promisor = true\" and add\n\"[extensions]\\npartialclone=origin\", so at least extensions.partialClone\nis still supported, even if not written by default.\n\n> So, I thought I would put this up on the list to point out the inconsistency, in case someone with more context has thoughts on the correct way forward here.\n\nThanks for bringing this up.\n"},{"id":"393148","messageId":"20200312175151.GB120942@google.com","threadId":"52982","inReplyTo":"20200312170714.180996-1-jonathantanmy@google.com","subject":"Re: [Question] Is extensions.partialClone defunct?","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2020-03-12T17:51:51Z","receivedAt":"2020-03-12T17:51:57Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Jonathan Tan wrote:\n> Derrick Stolee wrote:\n\n>> but it appears that we rely on the \"remote.<name>.promisor = true\"\n>> setting instead of this extension.\n>\n> Hmm...besides giving the name of the promisor remote, the\n> extensions.partialClone setting is there to prevent old versions of Git\n> (that do not know this extension) from manipulating the repo.\n\nYes, so the lack of setting is a bug.\n\nChristian, what would your prefered way be to fix this?  Should\nextensions.partialclone specify a particular \"default\" promisor\nremote, or should we use a new repository extension for multiple\npromisors?\n\n[...]\n> I cloned and indeed it is as Stolee describes. Git still works as\n> expected if I remove \"promisor = true\" and add\n> \"[extensions]\\npartialclone=origin\", so at least extensions.partialClone\n> is still supported, even if not written by default.\n\nThanks for investigating.\n\nSincerely,\nJonathan\n"},{"id":"393153","messageId":"xmqqsgidfnqz.fsf@gitster.c.googlers.com","threadId":"52982","inReplyTo":"20200312175151.GB120942@google.com","subject":"Re: [Question] Is extensions.partialClone defunct?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-03-12T18:10:12Z","receivedAt":"2020-03-12T18:10:17Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n>> Hmm...besides giving the name of the promisor remote, the\n>> extensions.partialClone setting is there to prevent old versions of Git\n>> (that do not know this extension) from manipulating the repo.\n>\n> Yes, so the lack of setting is a bug.\n>\n> Christian, what would your prefered way be to fix this?  Should\n> extensions.partialclone specify a particular \"default\" promisor\n> remote, or should we use a new repository extension for multiple\n> promisors?\n\nIt would depend on how well versions of Git that supported one\npromisor with extensions.partialClone works with a repository\ninitialized with Christian's multi promisors when the extension\npoints at only a single promisor.  Is having other/secondary\npromisors meant merely to be performance thing, or would the\nrepository be broken if these promisors are down because some\nobjects are never available from the \"origin\" or the primary\npromisor remote?  If the former, using a \"default\" promisor with\nextensions.partialClone would be sufficient and be preferred as we\ndo not end up wasting a new extension, but if the latter, we would\nneed to prevent Git that is capable of single-promisor from touching\nthe multi-promisor repository with a new extension.\n"},{"id":"393171","messageId":"20200312210954.GA13644@syl.local","threadId":"52982","inReplyTo":"20200312175151.GB120942@google.com","subject":"Re: [Question] Is extensions.partialClone defunct?","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2020-03-12T21:09:54Z","receivedAt":"2020-03-12T21:10:01Z","isPatch":false,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Thu, Mar 12, 2020 at 10:51:51AM -0700, Jonathan Nieder wrote:\n> Jonathan Tan wrote:\n> > Derrick Stolee wrote:\n>\n> >> but it appears that we rely on the \"remote.<name>.promisor = true\"\n> >> setting instead of this extension.\n> >\n> > Hmm...besides giving the name of the promisor remote, the\n> > extensions.partialClone setting is there to prevent old versions of Git\n> > (that do not know this extension) from manipulating the repo.\n\nManipulating it how?\n\n> Yes, so the lack of setting is a bug.\n>\n> Christian, what would your prefered way be to fix this?  Should\n> extensions.partialclone specify a particular \"default\" promisor\n> remote, or should we use a new repository extension for multiple\n> promisors?\n\nThis ambiguity makes me think that 'extensions.partialClone' is an\nawkward fit for repositories that have multiple promisor remotes.\n\n> [...]\n> > I cloned and indeed it is as Stolee describes. Git still works as\n> > expected if I remove \"promisor = true\" and add\n> > \"[extensions]\\npartialclone=origin\", so at least extensions.partialClone\n> > is still supported, even if not written by default.\n>\n> Thanks for investigating.\n>\n> Sincerely,\n> Jonathan\n\nThanks,\nTaylor\n"},{"id":"393173","messageId":"xmqqsgide0i3.fsf@gitster.c.googlers.com","threadId":"52982","inReplyTo":"20200312210954.GA13644@syl.local","subject":"Re: [Question] Is extensions.partialClone defunct?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-03-12T21:17:40Z","receivedAt":"2020-03-12T21:17:48Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Taylor Blau <me@ttaylorr.com> writes:\n\n> On Thu, Mar 12, 2020 at 10:51:51AM -0700, Jonathan Nieder wrote:\n>> Jonathan Tan wrote:\n>> > Derrick Stolee wrote:\n>>\n>> >> but it appears that we rely on the \"remote.<name>.promisor = true\"\n>> >> setting instead of this extension.\n>> >\n>> > Hmm...besides giving the name of the promisor remote, the\n>> > extensions.partialClone setting is there to prevent old versions of Git\n>> > (that do not know this extension) from manipulating the repo.\n>\n> Manipulating it how?\n\nPresumably if the version of Git does not assume that sometimes\nmissing objects are OK, its \"fsck\" and \"repack\" would become very\nupset when a repository lacks very many objects because the version\nof Git that created it assumes they can be lazily fetched, no?\n"},{"id":"393176","messageId":"20200312213044.GC872402@coredump.intra.peff.net","threadId":"52982","inReplyTo":"xmqqsgide0i3.fsf@gitster.c.googlers.com","subject":"Re: [Question] Is extensions.partialClone defunct?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-03-12T21:30:44Z","receivedAt":"2020-03-12T21:30:48Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Mar 12, 2020 at 02:17:40PM -0700, Junio C Hamano wrote:\n\n> Taylor Blau <me@ttaylorr.com> writes:\n> \n> > On Thu, Mar 12, 2020 at 10:51:51AM -0700, Jonathan Nieder wrote:\n> >> Jonathan Tan wrote:\n> >> > Derrick Stolee wrote:\n> >>\n> >> >> but it appears that we rely on the \"remote.<name>.promisor = true\"\n> >> >> setting instead of this extension.\n> >> >\n> >> > Hmm...besides giving the name of the promisor remote, the\n> >> > extensions.partialClone setting is there to prevent old versions of Git\n> >> > (that do not know this extension) from manipulating the repo.\n> >\n> > Manipulating it how?\n> \n> Presumably if the version of Git does not assume that sometimes\n> missing objects are OK, its \"fsck\" and \"repack\" would become very\n> upset when a repository lacks very many objects because the version\n> of Git that created it assumes they can be lazily fetched, no?\n\nYes (or even just \"git log\", which will barf when it hits a needed\nobject). Unlike some other extensions, I don't think that case would be\n_dangerous_ (i.e., for any case where it matters the old version is\nlikely to abort, thinking it's seeing corruption, rather than writing\nout a subtly wrong result).\n\nBut it is certainly more pleasant for the user to see \"we don't support\nthe partialClone extension\" than a spew of \"missing object\" messages.\n\n-Peff\n"},{"id":"393179","messageId":"CAP8UFD0+fyz=S_VN=EzPOOxNSNkge0uB84kEqQD_mudsFtR8Lg@mail.gmail.com","threadId":"52982","inReplyTo":"20200312175151.GB120942@google.com","subject":"Re: [Question] Is extensions.partialClone defunct?","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2020-03-12T21:54:29Z","receivedAt":"2020-03-12T21:54:45Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Thu, Mar 12, 2020 at 6:51 PM Jonathan Nieder <jrnieder@gmail.com> wrote:\n>\n> Jonathan Tan wrote:\n> > Derrick Stolee wrote:\n>\n> >> but it appears that we rely on the \"remote.<name>.promisor = true\"\n> >> setting instead of this extension.\n> >\n> > Hmm...besides giving the name of the promisor remote, the\n> > extensions.partialClone setting is there to prevent old versions of Git\n> > (that do not know this extension) from manipulating the repo.\n\nThat could be true of \"remote.<name>.promisor = true\".\n\n> Yes, so the lack of setting is a bug.\n>\n> Christian, what would your prefered way be to fix this?  Should\n> extensions.partialclone specify a particular \"default\" promisor\n> remote, or should we use a new repository extension for multiple\n> promisors?\n\nMy opinion has always been that \"extensions.partialClone = <remote>\"\nis a mistake as it is inherently making difficult to have many\npromisor remotes.\n\nIt is also not clear what a default should be. Should it be the last\npromisor remote that is tried when all the others couldn't provide all\nthe needed objects? Or should it be the first one that is tried? And\nwhat if the order should be different when pushing and when fetching?\n\nI think it is much clearer to have an order (that could be different\nwhen pushing and fetching) in which promisor remotes are tried.\n\nSo I'd rather obsolete \"extensions.partialClone = <remote>\" and to\nfind other ways.\n\n> [...]\n> > I cloned and indeed it is as Stolee describes. Git still works as\n> > expected if I remove \"promisor = true\" and add\n> > \"[extensions]\\npartialclone=origin\", so at least extensions.partialClone\n> > is still supported, even if not written by default.\n\nYeah, I didn't remove support for it. Maybe we could have\n\"[extensions]\\npartialclone=<bool>\" though that feels messy, or maybe\nwe could have another extension alltogether like\n\"[extensions]\\npromisorremotes=<bool>\" and over time obsolete\n\"extensions.partialClone\" altogether. I prefer the later.\n"},{"id":"393180","messageId":"CAP8UFD1LibB=BBhhAvVENCrZy52vUMDNnY04Hvkh=OJtzhQpNw@mail.gmail.com","threadId":"52982","inReplyTo":"CAP8UFD0+fyz=S_VN=EzPOOxNSNkge0uB84kEqQD_mudsFtR8Lg@mail.gmail.com","subject":"Re: [Question] Is extensions.partialClone defunct?","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2020-03-12T21:59:02Z","receivedAt":"2020-03-12T21:59:16Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Thu, Mar 12, 2020 at 10:54 PM Christian Couder\n<christian.couder@gmail.com> wrote:\n>\n> On Thu, Mar 12, 2020 at 6:51 PM Jonathan Nieder <jrnieder@gmail.com> wrote:\n> >\n> > Jonathan Tan wrote:\n> > > Derrick Stolee wrote:\n> >\n> > >> but it appears that we rely on the \"remote.<name>.promisor = true\"\n> > >> setting instead of this extension.\n> > >\n> > > Hmm...besides giving the name of the promisor remote, the\n> > > extensions.partialClone setting is there to prevent old versions of Git\n> > > (that do not know this extension) from manipulating the repo.\n>\n> That could be true of \"remote.<name>.promisor = true\".\n\nI mean for future versions, not for old versions.\n"},{"id":"393183","messageId":"20200312230931.GF120942@google.com","threadId":"52982","inReplyTo":"CAP8UFD0+fyz=S_VN=EzPOOxNSNkge0uB84kEqQD_mudsFtR8Lg@mail.gmail.com","subject":"Re: [Question] Is extensions.partialClone defunct?","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2020-03-12T23:09:31Z","receivedAt":"2020-03-12T23:09:39Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nChristian Couder wrote:\n>> Jonathan Tan wrote:\n\n>>> Hmm...besides giving the name of the promisor remote, the\n>>> extensions.partialClone setting is there to prevent old versions of Git\n>>> (that do not know this extension) from manipulating the repo.\n>\n> That could be true of \"remote.<name>.promisor = true\".\n\nTo be clear, Jonathan is referring to a specific feature of the\nextensions.* settings.  See\nDocumentation/technical/repository-version.txt for details:\n\n  2. If a version-1 repository specifies any `extensions.*` keys that\n     the running git has not implemented, the operation MUST NOT\n     proceed. Similarly, if the value of any known key is not understood\n     by the implementation, the operation MUST NOT proceed.\n\nNo other config key has that property.\n\n[...]\n> On Thu, Mar 12, 2020 at 6:51 PM Jonathan Nieder <jrnieder@gmail.com> wrote:\n\n>> Christian, what would your prefered way be to fix this?  Should\n>> extensions.partialclone specify a particular \"default\" promisor\n>> remote, or should we use a new repository extension for multiple\n>> promisors?\n[...]\n> So I'd rather obsolete \"extensions.partialClone = <remote>\" and to\n> find other ways.\n\nI *think* that means \"new repository extension\".\n\nThat suggests something like\n\n\t[extensions]\n\t\tmultiplePromisors = true\n\n[...]\n>                                                              or maybe\n> we could have another extension alltogether like\n> \"[extensions]\\npromisorremotes=<bool>\" and over time obsolete\n> \"extensions.partialClone\" altogether. I prefer the later.\n\nI think we're going to have to continue to support\nextensions.partialClone=<remote> for a long time anyway (breaking the\nability to work with existing repositories is expensive), so I'm\nreasonably comfortable with multiplePromisors being a separate\nextension.  Some faraway day, we can introduce\n\"repositoryFormatVersion = 2\" that mandates support for these\nextensions by default, allowing us to clean up and simplify.\n\nI can start writing a proposed patch to send this evening or tomorrow.\nThis behavior has been around for a few releases so it would want to\ncook until the 2.27 cycle.\n\nThanks,\nJonathan\n"},{"id":"393189","messageId":"xmqqblp1dsih.fsf@gitster.c.googlers.com","threadId":"52982","inReplyTo":"CAP8UFD0+fyz=S_VN=EzPOOxNSNkge0uB84kEqQD_mudsFtR8Lg@mail.gmail.com","subject":"Re: [Question] Is extensions.partialClone defunct?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-03-13T00:10:14Z","receivedAt":"2020-03-13T00:10:19Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Christian Couder <christian.couder@gmail.com> writes:\n\n> My opinion has always been that \"extensions.partialClone = <remote>\"\n> is a mistake as it is inherently making difficult to have many\n> promisor remotes.\n\nIs there a reason why extensions.partialClone cannot be\nmulti-valued, just like say \"remote.origin.fetch\" is?\n"},{"id":"393258","messageId":"CAP8UFD1ouu1EkJjGYuzJahZNX+QW-XyEPD-2Vfp8jMYNuVYkAA@mail.gmail.com","threadId":"52982","inReplyTo":"20200312230931.GF120942@google.com","subject":"Re: [Question] Is extensions.partialClone defunct?","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2020-03-14T06:43:55Z","receivedAt":"2020-03-15T04:04:55Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Hi,\n\nOn Fri, Mar 13, 2020 at 12:09 AM Jonathan Nieder <jrnieder@gmail.com> wrote:\n>\n> Christian Couder wrote:\n> >> Jonathan Tan wrote:\n>\n> >>> Hmm...besides giving the name of the promisor remote, the\n> >>> extensions.partialClone setting is there to prevent old versions of Git\n> >>> (that do not know this extension) from manipulating the repo.\n> >\n> > That could be true of \"remote.<name>.promisor = true\".\n>\n> To be clear, Jonathan is referring to a specific feature of the\n> extensions.* settings.  See\n> Documentation/technical/repository-version.txt for details:\n>\n>   2. If a version-1 repository specifies any `extensions.*` keys that\n>      the running git has not implemented, the operation MUST NOT\n>      proceed. Similarly, if the value of any known key is not understood\n>      by the implementation, the operation MUST NOT proceed.\n>\n> No other config key has that property.\n\nYeah, right. I was very tired and it was late when I replied, so I was confused.\n\n> > On Thu, Mar 12, 2020 at 6:51 PM Jonathan Nieder <jrnieder@gmail.com> wrote:\n>\n> >> Christian, what would your prefered way be to fix this?  Should\n> >> extensions.partialclone specify a particular \"default\" promisor\n> >> remote, or should we use a new repository extension for multiple\n> >> promisors?\n> [...]\n> > So I'd rather obsolete \"extensions.partialClone = <remote>\" and to\n> > find other ways.\n>\n> I *think* that means \"new repository extension\".\n\nYeah.\n\n> That suggests something like\n>\n>         [extensions]\n>                 multiplePromisors = true\n\nYeah, I think I suggested \"[extensions]\\npromisorremotes=<bool>\" but\n\"multiplePromisors\" is probably better.\n\n> >                                                              or maybe\n> > we could have another extension alltogether like\n> > \"[extensions]\\npromisorremotes=<bool>\" and over time obsolete\n> > \"extensions.partialClone\" altogether. I prefer the later.\n>\n> I think we're going to have to continue to support\n> extensions.partialClone=<remote> for a long time anyway (breaking the\n> ability to work with existing repositories is expensive), so I'm\n> reasonably comfortable with multiplePromisors being a separate\n> extension.  Some faraway day, we can introduce\n> \"repositoryFormatVersion = 2\" that mandates support for these\n> extensions by default, allowing us to clean up and simplify.\n\nYeah, I agree.\n\n> I can start writing a proposed patch to send this evening or tomorrow.\n\nThat would be very much appreciated! Thanks!\n\n> This behavior has been around for a few releases so it would want to\n> cook until the 2.27 cycle.\n\nYeah, and partial clone is experimental, so I think it's ok.\n"},{"id":"426487","messageId":"CAPMMpohp4TPAD2yswY5zEvC5vqiY-zoXKCU4eqWWGRngmZVkhg@mail.gmail.com","threadId":"52982","inReplyTo":"CAP8UFD1ouu1EkJjGYuzJahZNX+QW-XyEPD-2Vfp8jMYNuVYkAA@mail.gmail.com","subject":"Re: [Question] Is extensions.partialClone defunct?","fromName":"Tao Klerks","fromEmail":"tao@klerks.biz","sentAt":"2021-06-05T13:01:58Z","receivedAt":"2021-06-05T13:02:12Z","isPatch":false,"sender":{"key":"tao@klerks.biz","avatar":"https://avatars.githubusercontent.com/u/531704?v=4"},"body":"Hi folks, my apologies if old thread reanimation is frowned upon, I\nhave not been able to find any indications that this is the case.\n\nOn Sat, Mar 14, 2020 at 6:43 AM Christian Couder\n<christian.couder@gmail.com> wrote:\n> On Fri, Mar 13, 2020 at 12:09 AM Jonathan Nieder <jrnieder@gmail.com> wrote:\n> > [...]\n> > >>> Hmm...besides giving the name of the promisor remote, the\n> > >>> extensions.partialClone setting is there to prevent old versions of Git\n> > >>> (that do not know this extension) from manipulating the repo.\n\nI was going to start a new thread about just this topic today, but\nlearned to use the archives instead, for better or for worse...\n\n> > I can start writing a proposed patch to send this evening or tomorrow.\n> That would be very much appreciated! Thanks!\n\nWas this change ever attempted? Git's current behavior (as of 2.31.1)\nappears to still violate the semantics of\ncore.repositoryformatversion=1 as documented at\nhttps://github.com/git/git/blob/master/Documentation/technical/repository-version.txt,\nand this has been the case since git 2.24.\nI assume the right fix at this point would be to do something like\nauto-detecting promisor remotes and/or packfiles and adding the\nextensions.partialClone config key automatically/transparently. The\nmain question seems to be *what value* the config key should hold, if\nthere are multiple promisor remotes?\n\n> > >> Christian, what would your prefered way be to fix this?  Should\n> > >> extensions.partialclone specify a particular \"default\" promisor\n> > >> remote, or should we use a new repository extension for multiple\n> > >> promisors?\n> > [...]\n> > > So I'd rather obsolete \"extensions.partialClone = <remote>\" and to\n> > > find other ways.\n> >\n> > I *think* that means \"new repository extension\".\n> > [...]\n> > That suggests something like\n> >\n> >         [extensions]\n> >                 multiplePromisors = true\n> > [...]\n> > > or maybe\n> > > we could have another extension alltogether like\n> > > \"[extensions]\\npromisorremotes=<bool>\" and over time obsolete\n> > > \"extensions.partialClone\" altogether. I prefer the later.\n> >\n> > I think we're going to have to continue to support\n> > extensions.partialClone=<remote> for a long time anyway (breaking the\n> > ability to work with existing repositories is expensive), so I'm\n> > reasonably comfortable with multiplePromisors being a separate\n> > extension.  Some faraway day, we can introduce\n> > \"repositoryFormatVersion = 2\" that mandates support for these\n> > extensions by default, allowing us to clean up and simplify.\n>\n> > This behavior has been around for a few releases so it would want to\n> > cook until the 2.27 cycle.\n>\n> Yeah, and partial clone is experimental, so I think it's ok.\n>\n\nI'm a little confused by suggestions to create a *new* extension key\nhere. In principle, this would mean that existing repositories\ncreated/updated by the newest git version would declare themselves to\nbe incompatible with git clients that don't understand this\nentirely-new key, even though:\n * promisor packfiles are a reasonably longstanding thing now (several\nyears old),\n * they have officially/theoretically been associated with the\n\"partialClone\" extension key throughout that time (at least in the\ndocs), and\n * partial clone is no longer considered \"experimental\" in any public doc,\n\nThe kind of sudden backwards-incompatibility implied by a new\n\"extensions.*\" key seems... bad? (unless it's something that you\n*newly* opt in to - which doesn't seem to be the case here)\n\nThanks,\nTao\n"}]}