From 83487fd56397df8fd9b391ca5d00ac56f886e678 Mon Sep 17 00:00:00 2001 From: Michael Haggerty Date: Wed, 15 Oct 2014 17:06:23 +0200 Subject: resolve_gitlink_ref(): remove redundant test At this point we know that refs->name is a non-empty string, so we know we don't have to look up the reference in the main repository. Signed-off-by: Michael Haggerty Signed-off-by: Junio C Hamano --- refs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/refs.c b/refs.c index a16ef6ca89..53461aec5b 100644 --- a/refs.c +++ b/refs.c @@ -1305,9 +1305,7 @@ int resolve_gitlink_ref(const char *path, const char *refname, unsigned char *sh ret = -1; goto out; } - path = *refs->name - ? git_path_submodule(refs->name, "%s", result.buf) - : git_path("%s", result.buf); + path = git_path_submodule(refs->name, "%s", result.buf); parseval = parse_ref(path, &result, sha1, NULL); } while (!parseval); -- cgit v1.2.1