]> git.ipfire.org Git - thirdparty/git.git/commit - pretty.c
strbuf: convert strbuf_add_unique_abbrev to use struct object_id
authorbrian m. carlson <sandals@crustytoothpaste.net>
Mon, 12 Mar 2018 02:27:28 +0000 (02:27 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Mar 2018 16:23:48 +0000 (09:23 -0700)
commit30e677e0e243ebb29a5f5aeed8c850bbae9020fa
treea974611a14bd9f2b0b74116bfe96fc362762f196
parent1776979573fa150cfad850f73ab4109d245ad210
strbuf: convert strbuf_add_unique_abbrev to use struct object_id

Convert the declaration and definition of strbuf_add_unique_abbrev to
make it take a pointer to struct object_id.  Predeclare the struct in
strbuf.h, as cache.h includes strbuf.h before it declares the struct,
and otherwise the struct declaration would have the wrong scope.

Apply the following semantic patch, along with the standard object_id
transforms, to adjust the callers:

@@
expression E1, E2, E3;
@@
- strbuf_add_unique_abbrev(E1, E2.hash, E3);
+ strbuf_add_unique_abbrev(E1, &E2, E3);

@@
expression E1, E2, E3;
@@
- strbuf_add_unique_abbrev(E1, E2->hash, E3);
+ strbuf_add_unique_abbrev(E1, E2, E3);

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/checkout.c
builtin/fetch.c
builtin/tag.c
merge-recursive.c
pretty.c
strbuf.c
strbuf.h
submodule.c
transport.c
wt-status.c