Merge branch 'rs/resolve-ref-optional-result'
Code clean-up. * rs/resolve-ref-optional-result: refs: pass NULL to resolve_ref_unsafe() if hash is not needed refs: pass NULL to refs_resolve_ref_unsafe() if hash is not needed refs: make sha1 output parameter of refs_resolve_ref_unsafe() optional
This commit is contained in:
@ -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