summaryrefslogtreecommitdiff
path: root/t/unit-tests
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2025-08-18 17:04:17 -0400
committerJunio C Hamano <gitster@pobox.com>2025-08-20 09:08:57 -0700
commit7c10e48e81ae63974e3badf3b7df71df74a0640b (patch)
tree4c7de042dad6c239f99efa7d99771d4a143b9994 /t/unit-tests
parent8cfd4ac215e3711757acef8043c1c3bf3689f606 (diff)
describe: pass commit to describe_commit()
There's a call in describe_commit() to lookup_commit_reference(), but we don't check the return value. If it returns NULL, we'll segfault as we immediately dereference the result. In practice this can never happen, since all callers pass an oid which came from a "struct commit" already. So we can make this more obvious by just taking that commit struct in the first place. Reported-by: Cheng <prophecheng@stu.pku.edu.cn> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/unit-tests')
0 files changed, 0 insertions, 0 deletions