diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-12-19 16:05:50 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-12-19 16:05:50 -0800 |
commit | 2e05710a161e6287f239fae42b86b0cb46190834 (patch) | |
tree | a2dd4d1acc86d20f7888ee4f09f7d54d600ff33e /builtin/for-each-ref.c | |
parent | Merge branch 'jn/maint-sequencer-fixes' (diff) | |
parent | Rename resolve_ref() to resolve_ref_unsafe() (diff) | |
download | tgif-2e05710a161e6287f239fae42b86b0cb46190834.tar.xz |
Merge branch 'nd/resolve-ref'
* nd/resolve-ref:
Rename resolve_ref() to resolve_ref_unsafe()
Convert resolve_ref+xstrdup to new resolve_refdup function
revert: convert resolve_ref() to read_ref_full()
Diffstat (limited to 'builtin/for-each-ref.c')
-rw-r--r-- | builtin/for-each-ref.c | 7 |
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 = ""; } |