Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Read the description file without repo.desc
Only a scanned repository fell back to its description file, so one
listed in cgitrc without repo.desc showed "[no description]" however
its file read. repo.desc may follow repo.path, so the file is read
where a page shows the description, which also spares every other
request the reads.
Diffstat (limited to 'source/shared.h')
| -rw-r--r-- | source/shared.h | 8 |
1 file changed, 8 insertions, 0 deletions
diff --git a/source/shared.h b/source/shared.h index 302b752..f182962 100644 --- a/source/shared.h +++ b/source/shared.h @@ -75,6 +75,14 @@ extern int cgit_read_first_line(const char *path, char **buf); extern char *cgit_strdup_first_line(const char *text); /* + * Give a repository that cgitrc left without a description the first line of + * the description file git keeps in it, unless that is still git's + * placeholder. Pages call it only for the repositories they show, so a request + * reads no more of these files than it needs. + */ +extern void cgit_read_repo_desc(struct cgit_repo *repo); + +/* * How many bytes the UTF-8 sequence at p holds, or 0 when it is invalid, * looking at most left bytes ahead. */ |
