diff options
Diffstat (limited to 'source/cgit.c')
-rw-r--r--source/cgit.c6
1 file changed, 2 insertions, 4 deletions
diff --git a/source/cgit.c b/source/cgit.c
index 633b011..82c496e 100644
--- a/source/cgit.c
+++ b/source/cgit.c
@@ -1035,10 +1035,8 @@ static void parse_readme(const char *readme, char **filename, char **ref, struct
if (!readme || !readme[0])
return;
- // A colon separates a ref from a path, so a setting carrying one names
- // a file tracked in the repository rather than one on disk.
- colon = strchr(readme, ':');
- if (colon && strlen(colon) > 1) {
+ if (cgit_readme_is_tracked(readme)) {
+ colon = strchr(readme, ':');
if (colon == readme && ctx.qry.head)
*ref = xstrdup(ctx.qry.head);
else if (colon == readme && repo->defbranch)