git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: Christopher Lindee <christopher.lindee@webpros.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH 0/2] Optionally support push options on up-to-date branches
Date: Thu, 14 Mar 2024 16:29:40 -0700	[thread overview]
Message-ID: <xmqqv85otmsb.fsf@gitster.g> (raw)
In-Reply-To: <ZfOAdVy9_UfTj3zE@tapette.crustytoothpaste.net> (brian m. carlson's message of "Thu, 14 Mar 2024 22:55:49 +0000")

"brian m. carlson" <sandals@crustytoothpaste.net> writes:

>> A radical counter-proposal for the design is to update the client
>> side to do this unconditionally, without needing any new option.
>
> I'm not sure that would be a great idea.

Thanks.  I was looking for a push-back ;-)

> Since it's a push, that will
> trigger authentication, which may prompt the user (e.g., for a password
> or token or for a YubiKey touch with FIDO2 SSH) and which they might be
> able to easily avoid.

Do you mean we first go unauthenticated to find out what commits are
at the tip of refs at the destination repository, and then switch to
authenticated push after we find out there is something that is
worth pushing?  I somehow thought we need an authenticated access
only for the initial ls-refs exchange.

> As a server operator, I also expect that there
> are people doing lots of needless attempts at pushing in automated
> systems (because with enough users, there will be at least some who do
> bizarre or inefficient things), and I would prefer to avoid serving
> those requests if I don't need to.  (For example, for us, reference
> updates need to go through a distributed commit protocol to update
> multiple replicas of the repository, and if there's no ref updates, then
> we cut out multiple services which we don't need to contact.)

Yes, but if you have an extra no-op ref update in the bunch, that
one is excluded from the set of changes to be synchronised across
replicas, no?

> Note also that no-op ref updates cannot be simply omitted on the server
> side because we need to verify that the old value for the ref is
> correct, or we need to reject the operation as out of date.

Yes, but isn't that something the user would rather want to find out
earlier rather than later?  Your push without no-op update may say
"ah, we are up to date" when we are behind or worse diverged.  If we
do the no-op update more often, we'd have more chance to catch such
a situation where the worldview the end-user's repository has is out
of sync with reality.

> I do think the proposed change is valuable, though, and I'm in favour of
> it with a suitable option.

In any case, I am OK with the feature.  I just was wondering if the
end-user experience may become simpler and easier if we did not have
to have a command line option.

Thanks.


  reply	other threads:[~2024-03-14 23:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12 21:55 [PATCH 0/2] Optionally support push options on up-to-date branches Christopher Lindee
2024-03-13 22:58 ` Junio C Hamano
2024-03-14 22:55   ` brian m. carlson
2024-03-14 23:29     ` Junio C Hamano [this message]
2024-03-15  0:04       ` Chris Torek
2024-03-15  0:57         ` brian m. carlson
2024-03-15  0:19       ` Christopher Lindee
2024-03-15 15:42         ` Junio C Hamano
2024-03-15  0:39       ` brian m. carlson
2024-03-15  8:58         ` Christopher Lindee
2024-03-15 20:29           ` brian m. carlson
2024-03-15  0:11     ` Christopher Lindee
2024-03-14 23:08   ` Christopher Lindee

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=xmqqv85otmsb.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=christopher.lindee@webpros.com \
    --cc=git@vger.kernel.org \
    --cc=sandals@crustytoothpaste.net \
    /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).