summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-03-19 22:25:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-03-19 22:25:37 (GMT)
commit35381b13da846cc6ad620f9f9a5abf1d974d6e9b (patch)
tree9fbbe703441c5c11848cb140e88a46211703f483 /builtin
parent8779c141da62d66be5d420b94d506636006a7901 (diff)
parent7730f85594d4595605934e39d1d816ab663d8fa8 (diff)
downloadgit-35381b13da846cc6ad620f9f9a5abf1d974d6e9b.zip
git-35381b13da846cc6ad620f9f9a5abf1d974d6e9b.tar.gz
git-35381b13da846cc6ad620f9f9a5abf1d974d6e9b.tar.bz2
Merge branch 'jk/bisect-peel-tag-fix'
"git bisect" reimplemented more in C during 2.30 timeframe did not take an annotated tag as a good/bad endpoint well. This regression has been corrected. * jk/bisect-peel-tag-fix: bisect: peel annotated tags to commits
Diffstat (limited to 'builtin')
-rw-r--r--builtin/bisect--helper.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c
index d69e133..1fdb7d9 100644
--- a/builtin/bisect--helper.c
+++ b/builtin/bisect--helper.c
@@ -874,12 +874,19 @@ static enum bisect_error bisect_state(struct bisect_terms *terms, const char **a
*/
for (; argc; argc--, argv++) {
+ struct commit *commit;
+
if (get_oid(*argv, &oid)){
error(_("Bad rev input: %s"), *argv);
oid_array_clear(&revs);
return BISECT_FAILED;
}
- oid_array_append(&revs, &oid);
+
+ commit = lookup_commit_reference(the_repository, &oid);
+ if (!commit)
+ die(_("Bad rev input (not a commit): %s"), *argv);
+
+ oid_array_append(&revs, &commit->object.oid);
}
if (strbuf_read_file(&buf, git_path_bisect_expected_rev(), 0) < the_hash_algo->hexsz ||