From 5a31be6ece350a4b7994a20be138572c56479915 Mon Sep 17 00:00:00 2001
From: Robert Cranston <rcrnstn@rcrnstn.net>
Date: Sun, 1 Dec 2019 02:22:11 +0000
Subject: [PATCH] Expand macros for cgitrc root-title

The primary indended use case is to set it to $HTTP_HOST.
---
 cgit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cgit.c b/cgit.c
index ac8c641..8b2e7f3 100644
--- a/cgit.c
+++ b/cgit.c
@@ -136,7 +136,7 @@ static void config_cb(const char *name, const char *value)
 	else if (!strcmp(name, "readme"))
 		string_list_append(&ctx.cfg.readme, xstrdup(value));
 	else if (!strcmp(name, "root-title"))
-		ctx.cfg.root_title = xstrdup(value);
+		ctx.cfg.root_title = xstrdup(expand_macros(value));
 	else if (!strcmp(name, "root-desc"))
 		ctx.cfg.root_desc = xstrdup(value);
 	else if (!strcmp(name, "root-readme"))
-- 
2.11.0