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

Re: [PATCH v3 05/11] promisor-remote: use repository_format_partial_clone

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 1, 2019, 17:25 UTC
Message-ID
<xmqqbm1pvdri.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CAP8UFD1K=n1CriNSY75MyBG7ZDYUQRq3LcEMrxTJVcyhQgyJrg@mail.gmail.com>
Christian Couder <christian.couder@gmail.com> writes:
Show 21 quoted lines
> On Wed, Mar 13, 2019 at 5:31 AM Junio C Hamano <gitster@pobox.com> wrote:
>>
>> Christian Couder <christian.couder@gmail.com> writes:
>>
>> > A remote specified using the extensions.partialClone config
>> > option should be considered a promisor remote too.
>> >
>> > This remote should be at the end of the promisor remote list,
>> > so that it is used only if objects have not been found in other
>> > remotes.
>>
>> That's a declaration, not a rationale, and does not answer "Why
>> should the origin be only used as the last resort?".
>
> I have added the following explanation:
>
>     If we are using promisor remotes other than the origin, it is
>     because these other promisor remotes are likely to be better
>     for some reason (maybe they are closer or faster for some kind
>     of objects) than the origin, so it's logical that we try to use
>     them first.

Alternatively, perhaps you cloned from the origin repository which is a mirror that is not as reliable as the real thing but is faster to access when it _is_ up, and you added the true source that 'origin' mirrors from as the fallback, as it should only be used when 'origin' is down.

So what you wrote is not a convincing explanation why we should treat the origin as the fallback.

Writing in the end-user documentation something like "because the 'origin' remote is treated as the last resort fallback repository, after consulting other promisor remotes first and failing to obtain needed objects, you may want to use repositories with better availability listed as 'other promisor remotes' and set the worst connected remote as 'origin'" may be a valid thing to do, though.

I do not like to see the tool making such a policy decision for users very much, but at least by honestly documenting, we explain what we unilaterally decide to do without having a strong justification (i.e. we could decide the other way and the decision would be equally valid, and because there is no single best choice, we arbitrarily picked one) to the users, and with that, they can adjust their use case to what the tool does to take advantage of the tool's design decision.

Previous: Christian CouderNext: Christian Couder
Message 16 of 22 in “Many promisor remotes”
  1. 00/11 Many promisor remotesChristian Couder, Mar 12, 2019
  2. 01/11 fetch-object: make functions return an error codeChristian Couder, Mar 12, 2019
  3. 03/11 promisor-remote: implement promisor_remote_get_direct()Christian Couder, Mar 12, 2019
  4. Junio C HamanoMar 13, 2019
  5. Christian CouderApr 1, 2019
  6. 02/11 Add initial support for many promisor remotesChristian Couder, Mar 12, 2019
  7. Junio C HamanoMar 13, 2019
  8. Junio C HamanoMar 13, 2019
  9. Christian CouderApr 1, 2019
  10. 04/11 promisor-remote: add promisor_remote_reinit()Christian Couder, Mar 12, 2019
  11. Junio C HamanoMar 13, 2019
  12. Christian CouderApr 1, 2019
  13. 05/11 promisor-remote: use repository_format_partial_cloneChristian Couder, Mar 12, 2019
  14. Junio C HamanoMar 13, 2019
  15. Christian CouderApr 1, 2019
  16. Junio C HamanoApr 1, 2019
  17. 07/11 promisor-remote: parse remote.*.partialclonefilterChristian Couder, Mar 12, 2019
  18. 08/11 builtin/fetch: remove unique promisor remote limitationChristian Couder, Mar 12, 2019
  19. 06/11 Use promisor_remote_get_direct() and has_promisor_remote()Christian Couder, Mar 12, 2019
  20. 09/11 t0410: test fetching from many promisor remotesChristian Couder, Mar 12, 2019
  21. 10/11 partial-clone: add multiple remotes in the docChristian Couder, Mar 12, 2019
  22. 11/11 remote: add promisor and partial clone config to the docChristian Couder, Mar 12, 2019

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.