diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-10-05 13:48:19 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-05 13:48:19 +0900 |
commit | efe9d6ce33ed817150f4ff63ebfc14a3f7667eb4 (patch) | |
tree | 445ad62e5235a01002086d2009b35fb9cc16af96 /ref-filter.c | |
parent | 29a67ccc89b0f105aa8e6f675649145b88b2cb0e (diff) | |
parent | efbd4fdfc9978bf3872ca8cf390da4ffa3480188 (diff) | |
download | git-efe9d6ce33ed817150f4ff63ebfc14a3f7667eb4.tar.gz git-efe9d6ce33ed817150f4ff63ebfc14a3f7667eb4.tar.xz |
Merge branch 'rs/resolve-ref-optional-result'
Code clean-up.
* rs/resolve-ref-optional-result:
refs: pass NULL to resolve_refdup() if hash is not needed
refs: pass NULL to refs_resolve_refdup() if hash is not needed
Diffstat (limited to 'ref-filter.c')
-rw-r--r-- | ref-filter.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/ref-filter.c b/ref-filter.c index bc591f4f3..55323620a 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -295,9 +295,7 @@ static void if_atom_parser(const struct ref_format *format, struct used_atom *at static void head_atom_parser(const struct ref_format *format, struct used_atom *atom, const char *arg) { - struct object_id unused; - - atom->u.head = resolve_refdup("HEAD", RESOLVE_REF_READING, unused.hash, NULL); + atom->u.head = resolve_refdup("HEAD", RESOLVE_REF_READING, NULL, NULL); } static struct { @@ -1317,9 +1315,8 @@ static void populate_value(struct ref_array_item *ref) ref->value = xcalloc(used_atom_cnt, sizeof(struct atom_value)); if (need_symref && (ref->flag & REF_ISSYMREF) && !ref->symref) { - struct object_id unused1; ref->symref = resolve_refdup(ref->refname, RESOLVE_REF_READING, - unused1.hash, NULL); + NULL, NULL); if (!ref->symref) ref->symref = ""; } |