diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2011-12-13 18:17:48 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-12-13 21:26:52 +0400 |
commit | 96ec7b1e708863d0cd6b8e72a986d6f0a1bb64db (patch) | |
tree | 6957ce802074c55c0973c8533dbd399a314ecc55 /refs.c | |
parent | e4776bd936aa162b7f00cb26260dc4a6ca444abb (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 'refs.c')
-rw-r--r-- | refs.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -605,6 +605,12 @@ const char *resolve_ref(const char *ref, unsigned char *sha1, int reading, int * return ref; } +char *resolve_refdup(const char *ref, unsigned char *sha1, int reading, int *flag) +{ + const char *ret = resolve_ref(ref, sha1, reading, flag); + return ret ? xstrdup(ret) : NULL; +} + /* The argument to filter_refs */ struct ref_filter { const char *pattern; |