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

Re: [PATCH 0/2] Optionally support push options on up-to-date branches

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 14, 2024, 23:29 UTC
Message-ID
<xmqqv85otmsb.fsf@gitster.g>
In-Reply-To
<ZfOAdVy9_UfTj3zE@tapette.crustytoothpaste.net>
"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.

Show 8 quoted lines
> 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.
Previous: brian m. carlsonNext: Chris Torek
Message 4 of 13 in “Optionally support push options on up-to-date branches”
  1. 0/2 Optionally support push options on up-to-date branchesChristopher Lindee, Mar 12, 2024
  2. Junio C HamanoMar 13, 2024
  3. brian m. carlsonMar 14, 2024
  4. Junio C HamanoMar 14, 2024
  5. Chris TorekMar 15, 2024
  6. brian m. carlsonMar 15, 2024
  7. Christopher LindeeMar 15, 2024
  8. Junio C HamanoMar 15, 2024
  9. brian m. carlsonMar 15, 2024
  10. Christopher LindeeMar 15, 2024
  11. brian m. carlsonMar 15, 2024
  12. Christopher LindeeMar 15, 2024
  13. Christopher LindeeMar 14, 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.