Support refspecs in about-filter.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
此提交包含在:
Jason A. Donenfeld
2010-08-04 00:45:42 +02:00
提交者 Lars Hjemli
父節點 aec9c245e7
當前提交 379e80e3a8
共有 5 個檔案被更改,包括 63 行新增7 行删除

4
cgit.c
查看文件

@@ -1,6 +1,7 @@
/* cgit.c: cgi for the git scm
*
* Copyright (C) 2006 Lars Hjemli
* Copyright (C) 2010 Jason A. Donenfeld <Jason@zx2c4.com>
*
* Licensed under GNU General Public License v2
* (see COPYING for full license text)
@@ -71,7 +72,8 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value)
else if (!strcmp(name, "section"))
repo->section = xstrdup(value);
else if (!strcmp(name, "readme") && value != NULL) {
if (*value == '/')
char *colon;
if (*value == '/' || ((colon = strchr(value, ':')) != NULL && colon != value && *(colon + 1) != '\0'))
repo->readme = xstrdup(value);
else
repo->readme = xstrdup(fmt("%s/%s", repo->path, value));