mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
refs: pass NULL to resolve_ref_unsafe() if hash is not needed
This allows us to get rid of some write-only variables, among them seven SHA1 buffers. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
e691b027b6
commit
744c040b19
@@ -486,10 +486,9 @@ static int show_head_ref(const char *refname, const struct object_id *oid,
|
||||
struct strbuf *buf = cb_data;
|
||||
|
||||
if (flag & REF_ISSYMREF) {
|
||||
struct object_id unused;
|
||||
const char *target = resolve_ref_unsafe(refname,
|
||||
RESOLVE_REF_READING,
|
||||
unused.hash, NULL);
|
||||
NULL, NULL);
|
||||
|
||||
if (target)
|
||||
strbuf_addf(buf, "ref: %s\n", strip_namespace(target));
|
||||
|
||||
Reference in New Issue
Block a user