From: Ronnie Sahlberg <sahlberg@xxxxxxxxxx> This function can be shared across all refs backends so move it to the common code. Signed-off-by: Ronnie Sahlberg <sahlberg@xxxxxxxxxx> Signed-off-by: David Turner <dturner@xxxxxxxxxxxxxxxx> Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> Signed-off-by: Michael Haggerty <mhagger@xxxxxxxxxxxx> --- refs/files-backend.c | 7 ------- refs/refs.c | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/refs/files-backend.c b/refs/files-backend.c index 6940d54..f84fa9e 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -1789,13 +1789,6 @@ const char *resolve_ref_unsafe(const char *refname, int resolve_flags, return ret; } -char *resolve_refdup(const char *refname, int resolve_flags, - unsigned char *sha1, int *flags) -{ - return xstrdup_or_null(resolve_ref_unsafe(refname, resolve_flags, - sha1, flags)); -} - /* The argument to filter_refs */ struct ref_filter { const char *pattern; diff --git a/refs/refs.c b/refs/refs.c index ae55d85..56dee05 100644 --- a/refs/refs.c +++ b/refs/refs.c @@ -615,3 +615,10 @@ int ref_exists(const char *refname) unsigned char sha1[20]; return !!resolve_ref_unsafe(refname, RESOLVE_REF_READING, sha1, NULL); } + +char *resolve_refdup(const char *refname, int resolve_flags, + unsigned char *sha1, int *flags) +{ + return xstrdup_or_null(resolve_ref_unsafe(refname, resolve_flags, + sha1, flags)); +} -- 2.6.2 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html