From: Junio C Hamano Date: Fri, 29 Aug 2025 16:44:37 +0000 (-0700) Subject: Merge branch 'jk/describe-blob' X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c64ec662d061f2d496f8e9738b5a71d3d148e95e;p=thirdparty%2Fgit.git Merge branch 'jk/describe-blob' "git describe " misbehaves and/or crashes in some corner cases, which has been taught to exit with failure gracefully. * jk/describe-blob: describe: pass commit to describe_commit() describe: handle blob traversal with no commits describe: catch unborn branch in describe_blob() describe: error if blob not found describe: pass oid struct by const pointer --- c64ec662d061f2d496f8e9738b5a71d3d148e95e diff --cc builtin/describe.c index 0540976210,04df89d56b..fbe78ace66 --- a/builtin/describe.c +++ b/builtin/describe.c @@@ -352,10 -313,10 +352,10 @@@ static void append_suffix(int depth, co repo_find_unique_abbrev(the_repository, oid, abbrev)); } - static void describe_commit(struct object_id *oid, struct strbuf *dst) + static void describe_commit(struct commit *cmit, struct strbuf *dst) { - struct commit *cmit, *gave_up_on = NULL; + struct commit *gave_up_on = NULL; - struct commit_list *list; + struct lazy_queue queue = LAZY_QUEUE_INIT; struct commit_name *n; struct possible_tag all_matches[MAX_TAGS]; unsigned int match_cnt = 0, annotated_cnt = 0, cur_match;