]> git.ipfire.org Git - thirdparty/git.git/commit
rev-parse: use selected alternate terms to look up refs
authorJonas Rebmann <kernel@schlaraffenlan.de>
Thu, 14 May 2026 09:07:06 +0000 (11:07 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 May 2026 10:56:35 +0000 (19:56 +0900)
commitcb559918253d636dc00afa8cb468a810c1f4347b
treed372899f80ffbd1a1443fa71cad790c9a248b789
parent0c0f93e7fa645c1058226a9bfde9e2b4441edf96
rev-parse: use selected alternate terms to look up refs

git rev-parse --bisect does not work when alternate bisect terms are
used, simply listing no revisions at all.

This is because a such bisect using e.g. "old" and "new" in place of
"good" and "bad" will name refs "refs/bisect/old" (or new) accordingly
so the hardcoded "refs/bisect/bad" (and good) yields no results in a
bisect using alternate terms.

Use the current bisect_terms to make rev-parse --bisect work in an
alternate term bisect.

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