diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Gate a readme ending in a colon like a disk path
trust-scan-config passed any readme holding a colon as a tracked file,
while the parser takes one only when a path follows the colon, so a
scanned repository could still name a file on disk outside itself. The
two now share one test.
Diffstat (limited to '')
| -rw-r--r-- | source/shared.h | 6 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 6 insertions, 0 deletions
diff --git a/source/shared.h b/source/shared.h index ca2ac6a..13932c8 100644 --- a/source/shared.h +++ b/source/shared.h @@ -110,6 +110,12 @@ extern char *cgit_expand_macros(const char *text); extern char *cgit_get_mimetype_for_filename(const char *filename); /* + * Whether a readme setting names a file tracked in the repository, written + * as ref:path or :path, rather than a file on the server's disk. + */ +extern int cgit_readme_is_tracked(const char *readme); + +/* * Whether a revision from the request is a hex object id or a possible ref * name, the only forms cgit hands to git. */ |
