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

Re: [PATCH v4] receive-pack: check if client is alive before completing the push

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 4, 2022, 19:19 UTC
Message-ID
<xmqqczk2moc2.fsf@gitster.g>
In-Reply-To
<220204.864k5e4yvf.gmgdl@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 13 quoted lines
> Is the motivation purely a UX change where it's considered that the user
> *must* be shown the output, or are we doing the wrong thing and not
> continuing at all if we run into SIGPIPE here (then presumably only for
> hooks that produce output?).
>
> I admit this is somewhat contrived, but aren't we now doing worse for
> users where the pre-receive hook takes 10s, but they already asked for
> their push to be performed. Then they disconnect from WiFi unexpectedly,
> and find that that it didn't go through?
>
> Anyway, I see you made this opt-in configurable in earlier iterations. I
> wonder if that's still something worth doing, or if we should just take
> this change as-is.

I guess the above is exactly the same reaction I still have against the series. In a case where the user did *not* see "git push" complete after getting a positive response from the other side that says the changes to refs have succeeded, due to whatever reason (e.g. "^C" or connection droppage), the user cannot expect whether the push to have completed or got aborted, both from the UX point of view and from the correctness point of view, I would think.

Your keyboard interrupt "^C" may have come too late to matter at the receiving end, or your WiFi may or may not have disconnected before the receiving end got everything necessary from you to carry out the operation, for example, and you are not simply in control of these things.

Previous: Ævar Arnfjörð BjarmasonNext: Robin Jarry
Message 18 of 20 in “receive-pack: interrupt pre-receive when client disconnects”
  1. receive-pack: interrupt pre-receive when client disconnectsRobin Jarry, Jan 25, 2022
  2. Jiang XinJan 26, 2022
  3. Robin JarryJan 26, 2022
  4. receive-pack: add option to interrupt pre-receive when client exitsRobin Jarry, Jan 26, 2022
  5. Jiang XinJan 27, 2022
  6. Robin JarryJan 27, 2022
  7. Junio C HamanoJan 27, 2022
  8. Robin JarryJan 27, 2022
  9. Junio C HamanoJan 27, 2022
  10. Robin JarryJan 27, 2022
  11. receive-pack: check if client is alive before completing the pushRobin Jarry, Jan 27, 2022
  12. Junio C HamanoJan 28, 2022
  13. Robin JarryJan 28, 2022
  14. Junio C HamanoJan 28, 2022
  15. Robin JarryJan 28, 2022
  16. receive-pack: check if client is alive before completing the pushRobin Jarry, Jan 28, 2022
  17. Ævar Arnfjörð BjarmasonFeb 4, 2022
  18. Junio C HamanoFeb 4, 2022
  19. Robin JarryFeb 7, 2022
  20. Junio C HamanoJan 27, 2022

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.