diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Leave readme out of what scan-path fixes
| -rw-r--r-- | MANUAL.txt | 8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| -rwxr-xr-x | tests/t0303-robustness.sh | 10 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 files changed, 15 insertions, 3 deletions
@@ -465,9 +465,11 @@ scan-path:: repository containing a file named "noweb" is skipped, the reverse of what "strict-export" checks. Only the global settings taken before the scan-path directive apply to each repository. That holds for every - setting a repository inherits, among them section, snapshots, readme, - the filters and the enable flags, not only the entries that say so - explicitly. Default value: none. See also: cache-scan-ttl, project-list, + setting a repository inherits, among them section, snapshots, the + filters and the enable flags, not only the entries that say so + explicitly. The readme list is the exception, since a repository with + none of its own follows the global list as the whole cgitrc leaves it. + Default value: none. See also: cache-scan-ttl, project-list, strict-export, "Macro expansion". section:: diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh index 7b037bf..888ca7f 100755 --- a/tests/t0303-robustness.sh +++ b/tests/t0303-robustness.sh @@ -127,6 +127,16 @@ test_expect_success 'a readme ending in a colon is refused like a path on disk' ! grep "outside the repository" tmp ' +# The readme list is read as a page is served rather than copied at the +# scan-path line, so a readme set after the scan still applies. +test_expect_success 'a readme set after scan-path reaches a scanned repository' ' + rm scan/b.git/cgitrc && + cat gitcfgrc >laterrc && + echo "readme=master:file-1" >>laterrc && + CGIT_CONFIG="$PWD/laterrc" QUERY_STRING="url=b.git/about/" cgit >tmp && + grep "<pre class=.plaintext.>1$" tmp +' + # A repository served as html runs its pages on the site's own origin, so # the switch waits on trust like the keys that place markup. The warning has # to name the repository, which it did not for a key read from git config. |
