about summary refs log tree commit diff
path: root/cgit.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cgit.c46
-rw-r--r--cgit.css40
2 files changed, 64 insertions, 22 deletions
diff --git a/cgit.c b/cgit.c
index 57e11cd..608cab6 100644
--- a/cgit.c
+++ b/cgit.c
@@ -159,6 +159,10 @@ static void querystring_cb(const char *name, const char *value)
 		ctx.qry.name = xstrdup(value);
 	} else if (!strcmp(name, "mimetype")) {
 		ctx.qry.mimetype = xstrdup(value);
+	} else if (!strcmp(name, "s")){
+		ctx.qry.sort = xstrdup(value);
+	} else if (!strcmp(name, "showmsg")) {
+		ctx.qry.showmsg = atoi(value);
 	} else if (!strcmp(name, "period")) {
 		ctx.qry.period = xstrdup(value);
 	}
@@ -297,7 +301,6 @@ static void process_request(void *cbdata)
 	cmd = cgit_get_cmd(ctx);
 	if (!cmd) {
 		ctx->page.title = "cgit error";
-		ctx->repo = NULL;
 		cgit_print_http_headers(ctx);
 		cgit_print_docstart(ctx);
 		cgit_print_pageheader(ctx);
@@ -443,28 +446,29 @@ int main(int argc, const char **argv)
 	ctx.repo = NULL;
 	http_parse_querystring(ctx.qry.raw, querystring_cb);
 
-	/* If virtual-root isn't specified in cgitrc and no url
-	 * parameter is specified on the querystring, lets pretend
-	 * that virtualroot equals SCRIPT_NAME and use PATH_INFO as
-	 * url. This allows cgit to work with virtual urls without
-	 * the need for rewriterules in the webserver (as long as
-	 * PATH_INFO is included in the cache lookup key).
+	/* If virtual-root isn't specified in cgitrc, lets pretend
+	 * that virtual-root equals SCRIPT_NAME.
 	 */
-	if (!ctx.cfg.virtual_root && !ctx.qry.url) {
+	if (!ctx.cfg.virtual_root)
 		ctx.cfg.virtual_root = ctx.cfg.script_name;
-		path = getenv("PATH_INFO");
-		if (path) {
-			if (path[0] == '/')
-				path++;
-			ctx.qry.url = xstrdup(path);
-			if (ctx.qry.raw) {
-				qry = ctx.qry.raw;
-				ctx.qry.raw = xstrdup(fmt("%s?%s", path, qry));
-				free(qry);
-			} else
-				ctx.qry.raw = ctx.qry.url;
-			cgit_parse_url(ctx.qry.url);
-		}
+
+	/* If no url parameter is specified on the querystring, lets
+	 * use PATH_INFO as url. This allows cgit to work with virtual
+	 * urls without the need for rewriterules in the webserver (as
+	 * long as PATH_INFO is included in the cache lookup key).
+	 */
+	path = getenv("PATH_INFO");
+	if (!ctx.qry.url && path) {
+		if (path[0] == '/')
+			path++;
+		ctx.qry.url = xstrdup(path);
+		if (ctx.qry.raw) {
+			qry = ctx.qry.raw;
+			ctx.qry.raw = xstrdup(fmt("%s?%s", path, qry));
+			free(qry);
+		} else
+			ctx.qry.raw = ctx.qry.url;
+		cgit_parse_url(ctx.qry.url);
 	}
 
 	ttl = calc_ttl();
diff --git a/cgit.css b/cgit.css
index ef30fbf..e8214de 100644
--- a/cgit.css
+++ b/cgit.css
@@ -120,6 +120,10 @@ table.list tr {
 	background: white;
 }
 
+table.list tr.logheader {
+	background: #eee;
+}
+
 table.list tr:hover {
 	background: #eee;
 }
@@ -143,6 +147,17 @@ table.list td {
 	padding: 0.1em 0.5em 0.1em 0.5em;
 }
 
+table.list td.logsubject {
+	font-family: monospace;
+	font-weight: bold;
+}
+
+table.list td.logmsg {
+	font-family: monospace;
+	white-space: pre;
+	padding: 1em 0em 2em 0em;
+}
+
 table.list td a {
 	color: black;
 }
@@ -456,6 +471,30 @@ div.footer {
 	font-size: 80%;
 	color: #ccc;
 }
+a.branch-deco {
+	margin: 0px 0.5em;
+	padding: 0px 0.25em;
+	background-color: #88ff88;
+	border: solid 1px #007700;
+}
+a.tag-deco {
+	margin: 0px 0.5em;
+	padding: 0px 0.25em;
+	background-color: #ffff88;
+	border: solid 1px #777700;
+}
+a.remote-deco {
+	margin: 0px 0.5em;
+	padding: 0px 0.25em;
+	background-color: #ccccff;
+	border: solid 1px #000077;
+}
+a.deco {
+	margin: 0px 0.5em;
+	padding: 0px 0.25em;
+	background-color: #ff8888;
+	border: solid 1px #770000;
+}
 table.stats {
 	border: solid 1px black;
 	border-collapse: collapse;
@@ -532,4 +571,3 @@ table.hgraph div.bar {
 	background-color: #eee;
 	height: 1em;
 }
-