Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2011-12-13 18:17:48 +0400
committerJunio C Hamano <gitster@pobox.com>2011-12-13 21:26:52 +0400
commit96ec7b1e708863d0cd6b8e72a986d6f0a1bb64db (patch)
tree6957ce802074c55c0973c8533dbd399a314ecc55 /builtin/for-each-ref.c
parente4776bd936aa162b7f00cb26260dc4a6ca444abb (diff)
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/for-each-ref.c')
-rw-r--r--builtin/for-each-ref.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c
index d90e5d2b29..b01d76a243 100644
--- a/builtin/for-each-ref.c
+++ b/builtin/for-each-ref.c
@@ -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 = "";
}