From 744c040b19412fa5075810eb1aced105fad96726 Mon Sep 17 00:00:00 2001 From: René Scharfe Date: Sat, 23 Sep 2017 11:45:04 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- builtin/symbolic-ref.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'builtin/symbolic-ref.c') diff --git a/builtin/symbolic-ref.c b/builtin/symbolic-ref.c index df75cb9d4a..17aabaa679 100644 --- a/builtin/symbolic-ref.c +++ b/builtin/symbolic-ref.c @@ -12,9 +12,8 @@ static const char * const git_symbolic_ref_usage[] = { static int check_symref(const char *HEAD, int quiet, int shorten, int print) { - unsigned char sha1[20]; int flag; - const char *refname = resolve_ref_unsafe(HEAD, 0, sha1, &flag); + const char *refname = resolve_ref_unsafe(HEAD, 0, NULL, &flag); if (!refname) die("No such ref: %s", HEAD); -- cgit v1.2.3