ctx.qry.name = xstrdup(value);
} else if (!strcmp(name, "mimetype")) {
ctx.qry.mimetype = xstrdup(value);
ctx.qry.name = xstrdup(value);
} else if (!strcmp(name, "mimetype")) {
ctx.qry.mimetype = xstrdup(value);
ctx.qry.sort = xstrdup(value);
} else if (!strcmp(name, "showmsg")) {
ctx.qry.showmsg = atoi(value);
ctx.qry.sort = xstrdup(value);
} else if (!strcmp(name, "showmsg")) {
ctx.qry.showmsg = atoi(value);
- ref = resolve_ref("HEAD", sha1, 0, NULL);
+ ref = resolve_ref_unsafe("HEAD", sha1, 0, NULL);
if (!ref || prefixcmp(ref, "refs/heads/"))
return "master";
return xstrdup(ref + 11);
if (!ref || prefixcmp(ref, "refs/heads/"))
return "master";
return xstrdup(ref + 11);
for (i = 1; i < argc; i++) {
if (!strncmp(argv[i], "--cache=", 8)) {
for (i = 1; i < argc; i++) {
if (!strncmp(argv[i], "--cache=", 8)) {
}
if (!strncmp(argv[i], "--scan-tree=", 12) ||
!strncmp(argv[i], "--scan-path=", 12)) {
}
if (!strncmp(argv[i], "--scan-tree=", 12) ||
!strncmp(argv[i], "--scan-path=", 12)) {
ctx.cfg.virtual_root = trim_end(ctx.cfg.script_name, '/');
if (!ctx.cfg.virtual_root)
ctx.cfg.virtual_root = "";
ctx.cfg.virtual_root = trim_end(ctx.cfg.script_name, '/');
if (!ctx.cfg.virtual_root)
ctx.cfg.virtual_root = "";
/* If no url parameter is specified on the querystring, lets
* use PATH_INFO as url. This allows cgit to work with virtual
/* If no url parameter is specified on the querystring, lets
* use PATH_INFO as url. This allows cgit to work with virtual