]> Kevux Git Server - rit/commit
bisect: use selected alternate terms in status output
authorJonas Rebmann <kernel@schlaraffenlan.de>
Thu, 14 May 2026 09:07:04 +0000 (11:07 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 May 2026 10:56:34 +0000 (19:56 +0900)
commit99ac2324a52a2e37dcde6b8dd6c9fb44706a65a0
tree586a905a8f42860a241ebce91cbff25075cdae37
parentca1db8a0f7dc0dbea892e99f5b37c5fe5861be71
bisect: use selected alternate terms in status output

Alternate bisect terms are helpful when the terms "good" and "bad" are
confusing such as when bisecting for the resolution of an issue (the
first good commit) rather than the introduction of a regression.

These terms must be used when marking a commit (e.g. `git bisect new`),
they will be used in reference names (e.g. refs/bisect/new) and they are
used in parts of git's log output such as "<sha> was both old and new"
in git bisect skip's output.

However, hardcoded "good"/"bad" terms are still used in a few status
messages and can cause confusion about the status of the bisect such as:

  $ git bisect old
  [sha] is the first new commit

or about the required action such as:

  status: waiting for bad commit, 1 good commit known
  $ git bisect bad
  error: Invalid command: you're currently in a new/old bisect
  fatal: unknown command: 'bad'

This commit updates all remaining output messages which use hardcoded
"good" and "bad" terms to use the selected terms consistently across the
bisect output and adds tests.

Signed-off-by: Jonas Rebmann <kernel@schlaraffenlan.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/bisect.c
t/t6030-bisect-porcelain.sh