git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [Question] Is extensions.partialClone defunct?

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Mar 12, 2020, 23:09 UTC
Message-ID
<20200312230931.GF120942@google.com>
In-Reply-To
<CAP8UFD0+fyz=S_VN=EzPOOxNSNkge0uB84kEqQD_mudsFtR8Lg@mail.gmail.com>
Hi,
Christian Couder wrote:
>> Jonathan Tan wrote:
Show 5 quoted lines
>>> Hmm...besides giving the name of the promisor remote, the
>>> extensions.partialClone setting is there to prevent old versions of Git
>>> (that do not know this extension) from manipulating the repo.
>
> That could be true of "remote.<name>.promisor = true".

To be clear, Jonathan is referring to a specific feature of the extensions.* settings. See Documentation/technical/repository-version.txt for details:

  2. If a version-1 repository specifies any `extensions.*` keys that
     the running git has not implemented, the operation MUST NOT
     proceed. Similarly, if the value of any known key is not understood
     by the implementation, the operation MUST NOT proceed.
No other config key has that property.
[...]
> On Thu, Mar 12, 2020 at 6:51 PM Jonathan Nieder <jrnieder@gmail.com> wrote:
>> Christian, what would your prefered way be to fix this?  Should
>> extensions.partialclone specify a particular "default" promisor
>> remote, or should we use a new repository extension for multiple
>> promisors?
[...]
> So I'd rather obsolete "extensions.partialClone = <remote>" and to
> find other ways.
I *think* that means "new repository extension".
That suggests something like
	[extensions]
		multiplePromisors = true
[...]
>                                                              or maybe
> we could have another extension alltogether like
> "[extensions]\npromisorremotes=<bool>" and over time obsolete
> "extensions.partialClone" altogether. I prefer the later.

I think we're going to have to continue to support extensions.partialClone=<remote> for a long time anyway (breaking the ability to work with existing repositories is expensive), so I'm reasonably comfortable with multiplePromisors being a separate extension. Some faraway day, we can introduce "repositoryFormatVersion = 2" that mandates support for these extensions by default, allowing us to clean up and simplify.

I can start writing a proposed patch to send this evening or tomorrow. This behavior has been around for a few releases so it would want to cook until the 2.27 cycle.

Thanks, Jonathan

Previous: Christian CouderNext: Christian Couder
Message 10 of 13 in “[Question] Is extensions.partialClone defunct?”
  1. Derrick StoleeMar 12, 2020
  2. Jonathan TanMar 12, 2020
  3. Jonathan NiederMar 12, 2020
  4. Junio C HamanoMar 12, 2020
  5. Taylor BlauMar 12, 2020
  6. Junio C HamanoMar 12, 2020
  7. Jeff KingMar 12, 2020
  8. Christian CouderMar 12, 2020
  9. Christian CouderMar 12, 2020
  10. Jonathan NiederMar 12, 2020
  11. Christian CouderMar 14, 2020
  12. Tao KlerksJun 5, 2021
  13. Junio C HamanoMar 13, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.