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

Re: [PATCH] transport: no warning if no server wait-for-done

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 9, 2021, 17:31 UTC
Message-ID
<xmqqh7fyfrtl.fsf@gitster.g>
In-Reply-To
<20210806214612.1501980-1-jonathantanmy@google.com>
Jonathan Tan <jonathantanmy@google.com> writes:
Show 17 quoted lines
> When the push.negotiate configuration variable was implemented in
> 477673d6f3 ("send-pack: support push negotiation", 2021-05-05), Git was
> taught to print warning messages whenever that variable was set to true
> but push negotiation didn't happen. However, the lack of push
> negotiation is more similar to things like the usage of protocol v2 - in
> which the new feature is desired for performance, but if the feature
> is not there, the user does not intend to take any action - than to
> things like the usage of --filter - in which the new feature is desired
> for a certain outcome, and if the outcome does not happen, there is a
> high chance that the user would need to do something else (in this case,
> for example, reclone with "--depth" if the user needs the disk space).
>
> Therefore, when pushing with push.negotiate set to true, do not warn if
> wait-for-done is not supported for any reason (e.g. if the server is
> using an older version of Git or if protocol v2 is deactivated on the
> server). This is done by using an internal-use-only parameter to "git
> fetch".

Hmph, if this were a hard error, instead of "print warning messages", the above discussion is entirely reasonable. But I am not sure if squelching the warning unconditionally, especially given that the feature is relatively young, is a good idea.

I suspect that you are trying to hide the "failed" message that may sound more alarming then it should be from the end users, but if that is the case, wouldn't it be a better solution to reword the message to tone it down?

Show 7 quoted lines
> -	if (finish_command(&child)) {
> -		/*
> -		 * The information that push negotiation provides is useful but
> -		 * not mandatory.
> -		 */
> -		warning(_("push negotiation failed; proceeding anyway with push"));
> -	}

Perhaps like "optional ancestry negotiation failed---pushing normally" or some phrasing that assures the users that pushing without negotiation is perfectly normal?

Previous: Jonathan TanNext: Jonathan Nieder
Message 4 of 7 in “transport: no warning if no server wait-for-done”
  1. transport: no warning if no server wait-for-doneJonathan Tan, Aug 6, 2021
  2. Ævar Arnfjörð BjarmasonAug 7, 2021
  3. Jonathan TanAug 16, 2021
  4. Junio C HamanoAug 9, 2021
  5. Jonathan NiederAug 9, 2021
  6. Junio C HamanoAug 9, 2021
  7. Jonathan TanAug 16, 2021

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.