git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Christian Couder <christian.couder@gmail.com>
Cc: git@vger.kernel.org,  John Cai <johncai86@gmail.com>,
	 Patrick Steinhardt <ps@pks.im>
Subject: Re: [PATCH 0/4] upload-pack: support a missing-action
Date: Thu, 18 Apr 2024 12:21:59 -0700	[thread overview]
Message-ID: <xmqqo7a6tr1k.fsf@gitster.g> (raw)
In-Reply-To: <20240418184043.2900955-1-christian.couder@gmail.com> (Christian Couder's message of "Thu, 18 Apr 2024 20:40:39 +0200")

Christian Couder <christian.couder@gmail.com> writes:

> `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?

> 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?


      parent reply	other threads:[~2024-04-18 19:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-18 18:40 [PATCH 0/4] upload-pack: support a missing-action Christian Couder
2024-04-18 18:40 ` [PATCH 1/4] rev-list: refactor --missing=<missing-action> Christian Couder
2024-04-18 21:39   ` Junio C Hamano
2024-04-18 18:40 ` [PATCH 2/4] missing: support rejecting --missing=print Christian Couder
2024-04-18 21:47   ` Junio C Hamano
2024-04-18 18:40 ` [PATCH 3/4] pack-objects: use the missing action API Christian Couder
2024-04-18 18:40 ` [PATCH 4/4] upload-pack: allow configuring a missing-action Christian Couder
2024-04-18 19:21 ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqo7a6tr1k.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=johncai86@gmail.com \
    --cc=ps@pks.im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).