summaryrefslogtreecommitdiff
path: root/lockfile.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2021-03-16 15:15:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-03-17 18:24:08 (GMT)
commit7730f85594d4595605934e39d1d816ab663d8fa8 (patch)
tree824485749f820f7a9e5be4b62259c7be39fb822e /lockfile.c
parent94f6e3e283f2adfc518b39cfc39291f1c2832ad0 (diff)
downloadgit-7730f85594d4595605934e39d1d816ab663d8fa8.zip
git-7730f85594d4595605934e39d1d816ab663d8fa8.tar.gz
git-7730f85594d4595605934e39d1d816ab663d8fa8.tar.bz2
bisect: peel annotated tags to commits
This patch fixes a bug where git-bisect doesn't handle receiving annotated tags as "git bisect good <tag>", etc. It's a regression in 27257bc466 (bisect--helper: reimplement `bisect_state` & `bisect_head` shell functions in C, 2020-10-15). The original shell code called: sha=$(git rev-parse --verify "$rev^{commit}") || die "$(eval_gettext "Bad rev input: \$rev")" which will peel the input to a commit (or complain if that's not possible). But the C code just calls get_oid(), which will yield the oid of the tag. The fix is to peel to a commit. The error message here is a little non-idiomatic for Git (since it starts with a capital). I've mostly left it, as it matches the other converted messages (like the "Bad rev input" we print when get_oid() fails), though I did add an indication that it was the peeling that was the problem. It might be worth taking a pass through this converted code to modernize some of the error messages. Note also that the test does a bare "grep" (not i18ngrep) on the expected "X is the first bad commit" output message. This matches the rest of the test script. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'lockfile.c')
0 files changed, 0 insertions, 0 deletions