aboutsummaryrefslogtreecommitdiff
path: root/builtin/show-branch.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2011-12-13 21:17:48 +0700
committerJunio C Hamano <gitster@pobox.com>2011-12-13 09:26:52 -0800
commit96ec7b1e708863d0cd6b8e72a986d6f0a1bb64db (patch)
tree6957ce802074c55c0973c8533dbd399a314ecc55 /builtin/show-branch.c
parente4776bd936aa162b7f00cb26260dc4a6ca444abb (diff)
downloadgit-96ec7b1e708863d0cd6b8e72a986d6f0a1bb64db.tar.gz
git-96ec7b1e708863d0cd6b8e72a986d6f0a1bb64db.tar.xz
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>
Diffstat (limited to 'builtin/show-branch.c')
-rw-r--r--builtin/show-branch.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin/show-branch.c b/builtin/show-branch.c
index 4b480d7c7..a1f148e48 100644
--- a/builtin/show-branch.c
+++ b/builtin/show-branch.c
@@ -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;