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

Re: [PATCH 2/4] sequencer: do not translate parameters to error_resolve_conflict()

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 22, 2022, 13:53 UTC
Message-ID
<oqq42q11-3031-91or-no50-p68q85po1492@tzk.qr>
In-Reply-To
<xmqqfshsm8z1.fsf@gitster.g>
Hi Junio,

[Michael, I do not consider what I wrote below relevant for your patch series, you may ignore it if you want]

On Fri, 19 Aug 2022, Junio C Hamano wrote:
Show 9 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> >> Perhaps we should have the error_resolve_conflict() function take a
> >> "enum replay_action" instead?
> >
> > We could do that. We could also just delete the sequencer code. It's just
> > that both are a bad idea.
>
> Sorry, but I do not quite understand this comment.

I expected a seasoned reviewer to offer such a suggestion only after looking up (or remembering) how `error_resolve_conflict()` is defined, and where, and where its callers are.

After all, many suggestions that come to mind during a review turn out to be a bad idea when considering them carefully, and if that can be determined before the mail is sent, everybody wins back some time.

In this instance, `error_resolve_conflict()` is declared in `advice.h`. The suggestion to use a sequencer-specific data type there sounds... controversial. But okay, maybe there are good reasons to suggest that.

Let's look at the callers. Two callers in `sequencer.c`. Okay, maybe it makes a bit more sense. But one caller in `advice.c`? Let's dig deeper.

That caller in `advice.c` is `die_resolve_conflict()`, which is called in the built-ins `commit`, `merge-recursive`, `merge` and `pull`.

Those callers have nothing to do with the sequencer, therefore it is a bad idea to suggest using a sequencer-specific data type in that call chain.

From my perspective, that is enough to retire the suggestion.

When I wrote what I wrote, I thought that it was a pretty quick thing to determine, so quick that I really expected to not see such a suggestion on the mailing list in the first place.

In hindsight, I understand that you would have had to look at the code, and not just at the patch, to see this. And therefore it is probably not quite as obvious as I thought. I did not expect new contributors to be able to analyze this quickly, but a Git mailing list regular, yes.

For my flippant response, I apologize.

As for the suggestion I criticized: I stand by my assessment. It is not a good idea, and it was not necessary to send it out before doing a cursory sanity check. We want code contribution to have a high quality, and the code reviews should meet at least the same bar.

Ciao, Dscho

Previous: Junio C HamanoNext: Junio C Hamano
Message 26 of 34 in “sequencer: do not translate reflog messages”
  1. sequencer: do not translate reflog messagesMichael J Gruber, Aug 12, 2022
  2. Junio C HamanoAug 12, 2022
  3. Phillip WoodAug 12, 2022
  4. Junio C HamanoAug 12, 2022
  5. Johannes SchindelinAug 15, 2022
  6. Phillip WoodAug 16, 2022
  7. Johannes SchindelinAug 16, 2022
  8. 0/4 sequencer: clarify translationsMichael J Gruber, Aug 18, 2022
  9. 3/4 sequencer: do not translate command namesMichael J Gruber, Aug 18, 2022
  10. 1/4 sequencer: do not translate reflog messagesMichael J Gruber, Aug 18, 2022
  11. Ævar Arnfjörð BjarmasonAug 18, 2022
  12. Johannes SchindelinAug 19, 2022
  13. Ævar Arnfjörð BjarmasonAug 19, 2022
  14. Junio C HamanoAug 19, 2022
  15. Ævar Arnfjörð BjarmasonAug 19, 2022
  16. Junio C HamanoAug 19, 2022
  17. Ævar Arnfjörð BjarmasonAug 19, 2022
  18. Jeff KingAug 20, 2022
  19. Junio C HamanoAug 20, 2022
  20. 2/4 sequencer: do not translate parameters to error_resolve_conflict()Michael J Gruber, Aug 18, 2022
  21. Ævar Arnfjörð BjarmasonAug 18, 2022
  22. Michael J GruberAug 18, 2022
  23. Junio C HamanoAug 18, 2022
  24. Johannes SchindelinAug 19, 2022
  25. Junio C HamanoAug 19, 2022
  26. Johannes SchindelinAug 22, 2022
  27. Junio C HamanoAug 22, 2022
  28. 4/4 po: adjust README to codeMichael J Gruber, Aug 18, 2022
  29. Ævar Arnfjörð BjarmasonAug 18, 2022
  30. Junio C HamanoAug 18, 2022
  31. 4/4 sequencer: spell out command names and do not translate themMichael J Gruber, Aug 19, 2022
  32. Johannes SchindelinAug 19, 2022
  33. Johannes SchindelinAug 19, 2022
  34. Michael J GruberAug 19, 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.