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:
Junio C Hamano
2017-09-28 14:47:56 +09:00
17 changed files with 29 additions and 46 deletions

View File

@ -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));