summaryrefslogtreecommitdiffabout
path: root/cgit.c
authorLars Hjemli <hjemli@gmail.com>2008-06-26 10:54:44 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2008-06-26 10:54:44 (UTC)
commit29b37e9781ce1bb04e558c7490d2c29eb1a477e5 (patch) (side-by-side diff)
tree5a9a7b0b976b442cc8dda6195b804993c603d28d /cgit.c
parent833b0d2732f808281496df16eb917d6fdb0a274f (diff)
parent42effc939090b2fbf1b2b76cd1d9c30fabcd230e (diff)
downloadcgit-29b37e9781ce1bb04e558c7490d2c29eb1a477e5.zip
cgit-29b37e9781ce1bb04e558c7490d2c29eb1a477e5.tar.gz
cgit-29b37e9781ce1bb04e558c7490d2c29eb1a477e5.tar.bz2
Merge branch 'master' of git://git.klever.net/patchwork/cgit
* 'master' of git://git.klever.net/patchwork/cgit: allow specification of directly linked blobs mimetypes allow blob extract blobs by head/path combination
Diffstat (limited to 'cgit.c') (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cgit.c b/cgit.c
index ac882c3..0deae12 100644
--- a/cgit.c
+++ b/cgit.c
@@ -139,16 +139,18 @@ static void querystring_cb(const char *name, const char *value)
ctx.qry.sha2 = xstrdup(value);
ctx.qry.has_sha1 = 1;
} else if (!strcmp(name, "ofs")) {
ctx.qry.ofs = atoi(value);
} else if (!strcmp(name, "path")) {
ctx.qry.path = trim_end(value, '/');
} else if (!strcmp(name, "name")) {
ctx.qry.name = xstrdup(value);
+ } else if (!strcmp(name, "mimetype")) {
+ ctx.qry.mimetype = xstrdup(value);
}
}
static void prepare_context(struct cgit_context *ctx)
{
memset(ctx, 0, sizeof(ctx));
ctx->cfg.agefile = "info/web/last-modified";
ctx->cfg.nocache = 0;