aboutsummaryrefslogtreecommitdiff
path: root/cgit.c
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/cgit.c b/cgit.c
index 2de6d7f..4b2d86c 100644
--- a/cgit.c
+++ b/cgit.c
@@ -507,11 +507,9 @@ static inline void parse_readme(const char *readme, char **filename, char **ref,
/* Check if the readme is tracked in the git repo. */
colon = strchr(readme, ':');
if (colon && strlen(colon) > 1) {
- /* If it starts with a colon, we want to use head given
- * from query or the default branch */
- if (colon == readme && ctx.qry.head)
- *ref = xstrdup(ctx.qry.head);
- else if (colon == readme && repo->defbranch)
+ /* If it starts with a colon, we want to use
+ * the default branch */
+ if (colon == readme && repo->defbranch)
*ref = xstrdup(repo->defbranch);
else
*ref = xstrndup(readme, colon - readme);