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

Re: [Question] Is extensions.partialClone defunct?

From
Christian Couder <christian.couder@gmail.com>
Date
Mar 12, 2020, 21:54 UTC
Message-ID
<CAP8UFD0+fyz=S_VN=EzPOOxNSNkge0uB84kEqQD_mudsFtR8Lg@mail.gmail.com>
In-Reply-To
<20200312175151.GB120942@google.com>
On Thu, Mar 12, 2020 at 6:51 PM Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 10 quoted lines
>
> Jonathan Tan wrote:
> > Derrick Stolee wrote:
>
> >> but it appears that we rely on the "remote.<name>.promisor = true"
> >> setting instead of this extension.
> >
> > 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".
Show 6 quoted lines
> Yes, so the lack of setting is a bug.
>
> 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?

My opinion has always been that "extensions.partialClone = <remote>" is a mistake as it is inherently making difficult to have many promisor remotes.

It is also not clear what a default should be. Should it be the last promisor remote that is tried when all the others couldn't provide all the needed objects? Or should it be the first one that is tried? And what if the order should be different when pushing and when fetching?

I think it is much clearer to have an order (that could be different when pushing and fetching) in which promisor remotes are tried.

So I'd rather obsolete "extensions.partialClone = <remote>" and to find other ways.

Show 5 quoted lines
> [...]
> > I cloned and indeed it is as Stolee describes. Git still works as
> > expected if I remove "promisor = true" and add
> > "[extensions]\npartialclone=origin", so at least extensions.partialClone
> > is still supported, even if not written by default.

Yeah, I didn't remove support for it. Maybe we could have "[extensions]\npartialclone=<bool>" though that feels messy, or maybe we could have another extension alltogether like "[extensions]\npromisorremotes=<bool>" and over time obsolete "extensions.partialClone" altogether. I prefer the later.

Previous: Jeff KingNext: Christian Couder
Message 8 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.