git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Michael J Gruber" <git@grubix.eu>,
	git@vger.kernel.org, "Phillip Wood" <phillip.wood123@gmail.com>
Subject: Re: [PATCH 2/4] sequencer: do not translate parameters to error_resolve_conflict()
Date: Mon, 22 Aug 2022 15:53:56 +0200 (CEST)	[thread overview]
Message-ID: <oqq42q11-3031-91or-no50-p68q85po1492@tzk.qr> (raw)
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:

> 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


  reply	other threads:[~2022-08-22 13:54 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-12 15:38 [RFC/PATCH] sequencer: do not translate reflog messages Michael J Gruber
2022-08-12 17:21 ` Junio C Hamano
2022-08-12 19:21 ` Phillip Wood
2022-08-12 20:43   ` Junio C Hamano
2022-08-15 20:20     ` Johannes Schindelin
2022-08-16  8:59       ` Phillip Wood
2022-08-16 11:02         ` Johannes Schindelin
2022-08-18 13:13           ` [PATCH 0/4] sequencer: clarify translations Michael J Gruber
2022-08-18 13:13             ` [PATCH 1/4] sequencer: do not translate reflog messages Michael J Gruber
2022-08-18 14:55               ` Ævar Arnfjörð Bjarmason
2022-08-19  9:25                 ` Johannes Schindelin
2022-08-19 15:12                   ` Ævar Arnfjörð Bjarmason
2022-08-19 20:44                     ` Junio C Hamano
2022-08-19 21:13                       ` Ævar Arnfjörð Bjarmason
2022-08-19 22:42                         ` Junio C Hamano
2022-08-19 23:33                           ` Ævar Arnfjörð Bjarmason
2022-08-20  8:56                         ` Jeff King
2022-08-20 21:20                           ` Junio C Hamano
2022-08-18 13:13             ` [PATCH 2/4] sequencer: do not translate parameters to error_resolve_conflict() Michael J Gruber
2022-08-18 15:01               ` Ævar Arnfjörð Bjarmason
2022-08-18 15:23                 ` Michael J Gruber
2022-08-18 20:30                   ` Junio C Hamano
2022-08-19  9:26                 ` Johannes Schindelin
2022-08-19 17:36                   ` Junio C Hamano
2022-08-22 13:53                     ` Johannes Schindelin [this message]
2022-08-22 16:12                       ` Junio C Hamano
2022-08-18 13:13             ` [PATCH 3/4] sequencer: do not translate command names Michael J Gruber
2022-08-18 13:13             ` [PATCH 4/4] po: adjust README to code Michael J Gruber
2022-08-18 15:03               ` Ævar Arnfjörð Bjarmason
2022-08-18 20:36               ` Junio C Hamano
2022-08-19  7:50                 ` [PATCH 4/4 v2] sequencer: spell out command names and do not translate them Michael J Gruber
2022-08-19  9:30                   ` Johannes Schindelin
2022-08-19  9:32             ` [PATCH 0/4] sequencer: clarify translations Johannes Schindelin
2022-08-19 10:19               ` Michael J Gruber

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=oqq42q11-3031-91or-no50-p68q85po1492@tzk.qr \
    --to=johannes.schindelin@gmx.de \
    --cc=avarab@gmail.com \
    --cc=git@grubix.eu \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=phillip.wood123@gmail.com \
    /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).