show_head_ref(): do not shadow name of argument

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Michael Haggerty 2013-05-25 11:08:18 +02:00 committed by Junio C Hamano
parent f83918edcb
commit 1d811dbd04

View File

@ -416,8 +416,8 @@ static int show_head_ref(const char *name, const unsigned char *sha1,
struct strbuf *buf = cb_data;
if (flag & REF_ISSYMREF) {
unsigned char sha1[20];
const char *target = resolve_ref_unsafe(name, sha1, 1, NULL);
unsigned char unused[20];
const char *target = resolve_ref_unsafe(name, unused, 1, NULL);
const char *target_nons = strip_namespace(target);
strbuf_addf(buf, "ref: %s\n", target_nons);