git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Christopher Lindee <christopher.lindee@webpros.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>,
	Junio C Hamano <gitster@pobox.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH 0/2] Optionally support push options on up-to-date branches
Date: Fri, 15 Mar 2024 00:11:07 +0000	[thread overview]
Message-ID: <PH0PR14MB4702D52DAA9AA81BEDB32D1E8D282@PH0PR14MB4702.namprd14.prod.outlook.com> (raw)
In-Reply-To: <ZfOAdVy9_UfTj3zE@tapette.crustytoothpaste.net>

brian m. carlson writes:

> On 2024-03-13 at 22:58:58, Junio C Hamano wrote:
> > Christopher Lindee <christopher.lindee@webpros.com> writes:
> > > This changeset proposes to address this issue by adding an option to `push` and
> > > `send-pack` that, when specified, will send refs where the old-oid and new-oid
> > 
> > "where" -> "even if"
> > 
> > > are identical - instead of silently skipping these refs.  The first commit
> > > introduces the `--send-up-to-date` option to toggle this behavior, while the
> > > second commit updates the commands to output an `(up-to-date)` notice for each
> > > branch with an identical old-oid and new-oid.
> > > 
> > > Notably, the `--force` option will not send a ref when the remote is up-to-date.
> > 
> > And it makes sense *not* to update `--force` to do the no-op push,
> > becaues you may not want to (accidentally) force push a ref that
> > does not fast-forward.  As I already said, tying this with use of
> > the "-o" option is not sufficient.  So I agree we may want a new
> > option to trigger this behaviour.
> > 
> > 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.  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.  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.)

I agree.  I could easily see a nightly cron that backs up all refs to
a server that would then trigger server-side action.

I'm curious about authentication though, when I did a packet trace on
an up-to-date ref, I noticed it ended with:

push< ...
push< 0000
push> 0000

This suggests that something is sent back to the server.  Does that 
null entry not require authentication?

> 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.  While it is
> _unlikely_ that the ref has changed since we fetched it from the server,
> it's not guaranteed, especially if there's an expensive `pre-push` hook.

Regards,
Chris.

  parent reply	other threads:[~2024-03-15  0:11 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
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 [this message]
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=PH0PR14MB4702D52DAA9AA81BEDB32D1E8D282@PH0PR14MB4702.namprd14.prod.outlook.com \
    --to=christopher.lindee@webpros.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --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).