diff options
| author | 2010-08-04 07:45:42 (JST) | |
|---|---|---|
| committer | 2010-08-21 01:57:30 (JST) | |
| commit | 379e80e3a83481d3639c5d312eeddcce57c486b2 (patch) | |
| tree | 474ac38e3812008532d4ebd0b095ac835b5478b5 /cgit.c | |
| parent | aec9c245e7eaf444c7ae1851e3eda3b30748950f (diff) | |
| download | cgit-379e80e3a83481d3639c5d312eeddcce57c486b2.zip cgit-379e80e3a83481d3639c5d312eeddcce57c486b2.tar.gz | |
Support refspecs in about-filter.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cgit.c')
| -rw-r--r-- | cgit.c | 4 |
1 files changed, 3 insertions, 1 deletions
| @@ -1,6 +1,7 @@ | |||
| 1 | /* cgit.c: cgi for the git scm | 1 | /* cgit.c: cgi for the git scm |
| 2 | * | 2 | * |
| 3 | * Copyright (C) 2006 Lars Hjemli | 3 | * Copyright (C) 2006 Lars Hjemli |
| 4 | * Copyright (C) 2010 Jason A. Donenfeld <Jason@zx2c4.com> | ||
| 4 | * | 5 | * |
| 5 | * Licensed under GNU General Public License v2 | 6 | * Licensed under GNU General Public License v2 |
| 6 | * (see COPYING for full license text) | 7 | * (see COPYING for full license text) |
| @@ -71,7 +72,8 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value) | |||
| 71 | else if (!strcmp(name, "section")) | 72 | else if (!strcmp(name, "section")) |
| 72 | repo->section = xstrdup(value); | 73 | repo->section = xstrdup(value); |
| 73 | else if (!strcmp(name, "readme") && value != NULL) { | 74 | else if (!strcmp(name, "readme") && value != NULL) { |
| 74 | if (*value == '/') | 75 | char *colon; |
| 76 | if (*value == '/' || ((colon = strchr(value, ':')) != NULL && colon != value && *(colon + 1) != '\0')) | ||
| 75 | repo->readme = xstrdup(value); | 77 | repo->readme = xstrdup(value); |
| 76 | else | 78 | else |
| 77 | repo->readme = xstrdup(fmt("%s/%s", repo->path, value)); | 79 | repo->readme = xstrdup(fmt("%s/%s", repo->path, value)); |
