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

Re: [PATCH 0/4] upload-pack: support a missing-action

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 18, 2024, 19:21 UTC
Message-ID
<xmqqo7a6tr1k.fsf@gitster.g>
In-Reply-To
<20240418184043.2900955-1-christian.couder@gmail.com>
Christian Couder <christian.couder@gmail.com> writes:
Show 7 quoted lines
> `git pack-objects` already supports a `--missing=<missing-action>`
> option, so that it can avoid erroring out if some objects aren't
> available.
>
> It is interesting to have `git upload-pack` support a similar way to
> avoid sending some objects in case they aren't available on the
> server.
Is it interesting?  In what way?
Show 6 quoted lines
> For example, in case both the server and the client are using a
> separate promisor remote that contain some objects, it can be better
> if the server doesn't try to send such objects back to the client, but
> instead let the client get those objects separately from the promisor
> remote. (The client needs to have the separate promisor remote
> configured, for that to work.)

It is unclear what the precondition for such an arrangement to work reliably, and a lot more importantly, how we can validate that the precondition holds when "fetch" talks to "upload-pack". If you get it wrong, you'd have a server that would corrupt repositories that fetch from it.

That is where my "Is it really interesting? I do not find your explanation convincing yet." above primarily comes from.

Presumably "fetch" could tell "upload-pack" something like:
	I know how to fetch missing objects from this and that
	promisor remotes, so if you choose to, you may omit objects
	that you know are available from these promisor remotes when
	sending objects to me.

using a new capability, and we can allow upload-pack to omit objects only when such a new capability tells it to?

Previous: Christian CouderNext: Christian Couder
Message 8 of 13 in “upload-pack: support a missing-action”
  1. 0/4 upload-pack: support a missing-actionChristian Couder, Apr 18, 2024
  2. 1/4 rev-list: refactor --missing=<missing-action>Christian Couder, Apr 18, 2024
  3. Junio C HamanoApr 18, 2024
  4. 2/4 missing: support rejecting --missing=printChristian Couder, Apr 18, 2024
  5. Junio C HamanoApr 18, 2024
  6. 3/4 pack-objects: use the missing action APIChristian Couder, Apr 18, 2024
  7. 4/4 upload-pack: allow configuring a missing-actionChristian Couder, Apr 18, 2024
  8. Junio C HamanoApr 18, 2024
  9. 0/3 upload-pack: support a missing-actionChristian Couder, May 24, 2024
  10. 1/3 rev-list: refactor --missing=<missing-action>Christian Couder, May 24, 2024
  11. 2/3 pack-objects: use the missing action APIChristian Couder, May 24, 2024
  12. 3/3 upload-pack: allow configuring a missing-actionChristian Couder, May 24, 2024
  13. Junio C HamanoMay 24, 2024

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.