All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Aleksei Sviridkin <f@lex.la>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 1/2] t3507: pin CHERRY_PICK_HEAD absence for a conflicting --no-commit
Date: Fri, 4 Sep 2026 11:41:49 +0200	[thread overview]
Message-ID: <apqSXT4lT7v0ILjp@pks.im> (raw)
In-Reply-To: <20260903214553.53942-1-f@lex.la>

On Fri, Sep 04, 2026 at 12:45:53AM +0300, Aleksei Sviridkin wrote:
> Junio C Hamano <gitster@pobox.com> writes:
> > It is not apparent what problem, if any, the description
> > above claims the commit addresses.  Nor is it clear why
> > checking these combinations is relevant.
> > [...]
> > Can you help me understand the above two paragraphs a bit better?
> 
> The test pins the one combination t3507 did not cover. The file already
> checks CHERRY_PICK_HEAD after a conflicting pick, after a clean pick, and
> after a clean pick under --no-commit, but not after a conflicting pick
> under --no-commit. That is the case a user hits by accident: the pick
> stops on conflicts, they resolve and run "git commit", and the original
> author is not restored. --no-commit never wrote the ref, d7e5c0cbfb skips
> it on purpose. Your reading is right and Gemini's is backwards: under
> --no-commit we do not want CHERRY_PICK_HEAD, and the test asserts it is
> absent. Without it, teaching git to write the ref there would leave the
> whole file green.

The question is whether it really makes sense to have tests for every
single edge case. In a perfect world we of course would, but in the real
world there are a) gazillions of different combinations and b) every
test brings its own overhead as it increases both wall time and
maintenance costs.

That doesn't specifically mean that this one test you add here is not
useful. But we need to have a better argument than "we didn't have it
yet". For example we might've seen regressions, the logic is extremely
fragile or we risk bad consequences like data loss or an unrecoverable
situation if a property does not hold.

It's a thin line to walk at times, and I usually wouldn't care about
this too much. But over the last couple weeks we've seen more patch
series that add random tests to our test case without good reasoning
just for the sake of adding a test. And that's something that we need to
contain a bit.

Thanks!

Patrick

  reply	other threads:[~2026-09-04  9:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03 12:55 [PATCH 1/2] t3507: pin CHERRY_PICK_HEAD absence for a conflicting --no-commit Aleksei Sviridkin
2026-09-03 12:55 ` [PATCH 2/2] doc: cherry-pick: note --no-commit skips CHERRY_PICK_HEAD Aleksei Sviridkin
2026-09-03 21:32 ` [PATCH 1/2] t3507: pin CHERRY_PICK_HEAD absence for a conflicting --no-commit Junio C Hamano
2026-09-03 21:45   ` Aleksei Sviridkin
2026-09-04  9:41     ` Patrick Steinhardt [this message]
2026-09-04 12:45       ` Aleksei Sviridkin
2026-09-04 13:53       ` Phillip Wood
2026-09-05 17:13         ` Aleksei Sviridkin
2026-09-04 16:17       ` Junio C Hamano
2026-09-05 17:13       ` Aleksei Sviridkin
2026-09-04  9:53   ` Phillip Wood
2026-09-04 16:20     ` Junio C Hamano
2026-09-04  9:57 ` Phillip Wood
2026-09-04 12:45   ` Aleksei Sviridkin
2026-09-04 13:57     ` Phillip Wood
2026-09-05 17:13       ` Aleksei Sviridkin
2026-09-04 12:44 ` [PATCH v2] doc: cherry-pick: note --no-commit skips CHERRY_PICK_HEAD Aleksei Sviridkin
2026-09-05 16:29   ` Junio C Hamano
2026-09-05 17:13 ` [PATCH v3 0/2] cherry-pick: document that " Aleksei Sviridkin
2026-09-05 17:13   ` [PATCH v3 1/2] t3507: check no CHERRY_PICK_HEAD after conflicting --no-commit Aleksei Sviridkin
2026-09-05 17:13   ` [PATCH v3 2/2] doc: cherry-pick: note --no-commit skips CHERRY_PICK_HEAD Aleksei Sviridkin

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=apqSXT4lT7v0ILjp@pks.im \
    --to=ps@pks.im \
    --cc=f@lex.la \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.