AgeCommit message (Collapse)AuthorLines
Keep the login page out of search indexesBryce Kwon-0/+14
Keep a protected repository's header to itselfBryce Kwon-0/+28
The login page stands in for any page of the repository, so it named the description and owner of one the visitor may not see, including one hidden from the index. The site's own description fills the line, as on the index, so the header keeps its height.
Name the logo after the siteBryce Kwon-0/+7
Head the tag table's column for what it holdsBryce Kwon-0/+13
Say when a log search matches nothingBryce Kwon-0/+10
Answer a submodule path with the submoduleBryce Kwon-0/+9
The tree page read the gitlink's commit as a blob, which outside the repository is a bad object id and inside it is the commit's raw text.
Say when nothing matches a mistyped urlBryce Kwon-0/+11
Lead an error page's title with the errorBryce Kwon-0/+13
The config error page had a title of its own, in the reverse order, and now takes the same one as any other 404, since its message already says the repository failed to open.
Keep the range in a large diff's patch linkBryce Kwon-0/+11
The link named only id, so for a diff between two commits it led to a patch of the newer one alone, and without an id it lost the branch as well and led to the default branch's tip.
Offer blame only where it worksBryce Kwon-0/+29
The blame page answers 404 for a symlink, since git blames a regular file alone, and it refuses a binary file and one past max-blob-size, yet a tree listing offered blame for all of them, and so did a symlink's own page. Each row already knows its size, and git calls a file binary by its first 8000 bytes alone, which a stream reads without inflating the rest. With blame on, a listing of 2,000 delta-packed files went from about 11 to 15 ms.
Dump only the first 64 KB of a binary fileBryce Kwon-1/+18
Blame the previous revision under its own nameBryce Kwon-0/+21
Lead a blame page's folder crumbs to the treeBryce Kwon-0/+16
Link snapshots of a slash ref by a dashed nameBryce Kwon-0/+19
The snapshot page refuses to work a revision out of a name holding a slash, since that name becomes the top directory of the archive, so every link for a ref like release/2.0 answered 404. The ref now goes in the link as the id, and the archive unpacks into the repository's own prefix, as any snapshot asked for by id does.
Show a renamed file's diff as the renameBryce Kwon-0/+75
A diff limited to the new name cannot see the old one, so the diffstat's link for a renamed file, the commit page reached from that file's log, and the file's rawdiff and patch all showed every line as added. A path the old tree lacks is now diffed across the whole commit with rename detection aimed at it alone, the way git blame looks for a rename, so it is compared with the commit's deleted files and nothing else. Doing it in cgit_diff_tree keeps the log's counts for that commit in step with the page they link to. The rawdiff and patch pages leave the diff to git's own output, so for them that search finds the old name, and both names go into the limit with rename detection on.
Log the path of a repository that will not openBryce Kwon-0/+14
The 404 page names only the repository and nothing reached the log, so a mistyped repo.path left no trace of the path cgit had tried.
Read the description file without repo.descBryce Kwon-1/+28
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.
Report a word where cgitrc expects a numberBryce Kwon-0/+36
atoi reads "yes" or "true" as 0, so repo.hide=yes, or cgit.hide true in a scanned repository's git config, silently did nothing. The values keep that meaning, since honouring them now would hide repositories on upgrade, but each one is logged with its file and line.
Report a cgitrc or include that cannot be readBryce Kwon-0/+37
A missing or unreadable cgitrc left only "No repositories found" and an empty log, the commonest first mistake with no trace of its cause. A scanned repository's own cgitrc stays quiet, since most have none.
Keep a scan with a negative ttl for goodBryce Kwon-0/+21
"The cache" promises that a negative ttl never expires, but no age was ever below a negative cache-scan-ttl, so every request started a background rescan.
List scanned repositories in path orderBryce Kwon-0/+27
readdir hands entries back in whatever order the filesystem keeps them, so proj111 could come before proj105 and a section could start twice. section-sort is off by default to keep the order written in cgitrc, and a scan has none to keep.
Key the cached scan on every setting it usesBryce Kwon-3/+19
Two cgitrc files sharing a cache-root read one list, so strict-export and trust-scan-config set in one applied to the other, and a changed setting stayed stale until the list expired. The first request after an upgrade scans again, and the files under the old names are never read.
Drain the about filter in the config testsBryce Kwon-2/+6
Check only what the racy filter tests can promiseBryce Kwon-3/+7
Both tests passed or failed with the order in which cgit and the exec filter happened to run, about one run in four under UBSan.
Find a capitalised extension's lexer againBryce Kwon-5/+12
Scintillua's detect() matches an extension by its case, and the fallback e227d1f dropped had lowercased it, so MAIN.C and SETUP.PY lost their colour. The fake lexer now answers only for the suffixes it knows, as Scintillua does, which is what lets the check see it.
Test a lock won after its file became the slotBryce Kwon-1/+29
Spell side-by-side in the test commentsBryce Kwon-3/+3
Write the remaining config copies with cgitrc_copyBryce Kwon-12/+3
Move the feed link check in with the feed testsBryce Kwon-6/+6
It asks for a log page, and the index never carries a feed link.
Look for the old and new lines in one loopBryce Kwon-11/+4
Write the diff and patch checks as the suite doesBryce Kwon-29/+29
Drop the check for a language breakdown long goneBryce Kwon-4/+0
Ask for a url through cgit_url everywhereBryce Kwon-19/+19
Move the later tests to the config writersBryce Kwon-320/+182
The one-line request wrappers go with them. Configs with several repositories, a key out of place on purpose, the cache on or no repository of their own stay written out.
Add the shared config writers and cgit_rcBryce Kwon-275/+188
The helpers are named by kind. cgitrc_repo and cgitrc_copy write the config file named first, and cgit_url, cgit_query and cgit_rc run cgit, each named after what it is handed first. A repository copies its defaults from the globals read before its repo.url, so cgitrc_repo places every setting itself, and a global can no longer land where it silently stops applying. The t00xx and t01xx files move to them here.
Show the column fixture's commits like the othersBryce Kwon-1/+1
Drop test lines that repeat what came beforeBryce Kwon-6/+2
The download row was already matched on the same tag page, no fold can sit between the message and the signature the check requires, and the submodule row is the one the test before extracted.
Check a summary's branch, tags and clone url onceBryce Kwon-5/+0
bar's copies read the same page code as foo's, and the clone url row test that follows matches bar's url in full.
Leave the escape hook check to the tree testsBryce Kwon-11/+4
t0104 checks the same span, and what it holds, on the tree and blame pages, and t0502 checks it on a highlighted page.
Skip the shared fixtures where nothing reads themBryce Kwon-0/+2
t0004 reads only the documents, and t0005 builds its own repository and configs, so each run of either built five repositories for none.
Write the snapshot header and content checks onceBryce Kwon-21/+19
Leave snapshot and feed tool checks to test-libBryce Kwon-22/+5
A lazy prerequisite is checked only when a test asks for it, and test-lib names the missing one on every skipped test, so the skip notes go too. test-lib already defines UNZIP and the unzip it checks. The test that unpacks a tag's tar.gz with gzip now asks for GZIP like every other one that does.
Cut test comments restating the code beside themBryce Kwon-6/+1
Correct the test comments that went staleBryce Kwon-10/+10
Trim the tidy check down to what it doesBryce Kwon-17/+3
Nothing sets NO_TIDY_WARNINGS, and a warning never fails the check, so the knob only quieted the output of a verbose run.
Drop the exit lines that follow test_doneBryce Kwon-6/+0
test_done ends the script on every path, skip_all included.
Share one lock-file helper between the cachesBryce Kwon-0/+25
Ask for each path below the about page in one testBryce Kwon-22/+12
All of them stop at the same early return in about_fn, so each now gets the status, the html error page and a clean log.
Name the missing home without searching for oneBryce Kwon-10/+1
strace logs a call that names the path whether or not it succeeds, so a home that existed would still be caught, and cgit unsets HOME before git runs anyway.
Work out each gitlink's target onceBryce Kwon-11/+2
Test bodies run in the main shell, so the target named in the fixture reaches every check that greps for it.