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
@ -726,10 +726,8 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
|
||||
|
||||
if (ac == 0) {
|
||||
static const char *fake_av[2];
|
||||
const char *refname;
|
||||
|
||||
refname = resolve_ref("HEAD", sha1, 1, NULL);
|
||||
fake_av[0] = xstrdup(refname);
|
||||
fake_av[0] = resolve_refdup("HEAD", sha1, 1, NULL);
|
||||
fake_av[1] = NULL;
|
||||
av = fake_av;
|
||||
ac = 1;
|
||||
|
Reference in New Issue
Block a user