Convert find_unique_abbrev* to struct object_id
Convert find_unique_abbrev and find_unique_abbrev_r to each take a pointer to struct object_id. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
40f5555ca3
commit
aab9583f7b
@ -285,7 +285,7 @@ static void append_name(struct commit_name *n, struct strbuf *dst)
|
||||
|
||||
static void append_suffix(int depth, const struct object_id *oid, struct strbuf *dst)
|
||||
{
|
||||
strbuf_addf(dst, "-%d-g%s", depth, find_unique_abbrev(oid->hash, abbrev));
|
||||
strbuf_addf(dst, "-%d-g%s", depth, find_unique_abbrev(oid, abbrev));
|
||||
}
|
||||
|
||||
static void describe_commit(struct object_id *oid, struct strbuf *dst)
|
||||
@ -383,7 +383,7 @@ static void describe_commit(struct object_id *oid, struct strbuf *dst)
|
||||
if (!match_cnt) {
|
||||
struct object_id *cmit_oid = &cmit->object.oid;
|
||||
if (always) {
|
||||
strbuf_add_unique_abbrev(dst, cmit_oid->hash, abbrev);
|
||||
strbuf_add_unique_abbrev(dst, cmit_oid, abbrev);
|
||||
if (suffix)
|
||||
strbuf_addstr(dst, suffix);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user