Convert resolve_ref+xstrdup to new resolve_refdup function
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
e4776bd936
commit
96ec7b1e70
@ -628,11 +628,8 @@ static void populate_value(struct refinfo *ref)
|
||||
|
||||
if (need_symref && (ref->flag & REF_ISSYMREF) && !ref->symref) {
|
||||
unsigned char unused1[20];
|
||||
const char *symref;
|
||||
symref = resolve_ref(ref->refname, unused1, 1, NULL);
|
||||
if (symref)
|
||||
ref->symref = xstrdup(symref);
|
||||
else
|
||||
ref->symref = resolve_refdup(ref->refname, unused1, 1, NULL);
|
||||
if (!ref->symref)
|
||||
ref->symref = "";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user