Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2017-10-01 10:29:03 +0300
committerJunio C Hamano <gitster@pobox.com>2017-10-01 11:27:14 +0300
commitefbd4fdfc9978bf3872ca8cf390da4ffa3480188 (patch)
treeb3e8b62af87e612724c2b4a95dc2cbf1c94f6e90 /ref-filter.c
parent872ccb2c69ce44abb198efa1013dd4e0887a7495 (diff)
refs: pass NULL to resolve_refdup() if hash is not needed
This allows us to get rid of several write-only variables. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ref-filter.c')
-rw-r--r--ref-filter.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ref-filter.c b/ref-filter.c
index bc591f4f3d..55323620ab 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 = "";
}