[PATCH v2 11/11] resolve_gitlink_ref(): remove redundant test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <mhagger@xxxxxxxxxxxx>
---
 refs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/refs.c b/refs.c
index 8edcc3b..3f4b95a 100644
--- a/refs.c
+++ b/refs.c
@@ -1303,9 +1303,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);
 
-- 
2.1.1

--
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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]