AgeCommit message (Collapse)AuthorLines
Share the rename fixture of the diff pagesBryce Kwon-9/+1
Each repository is built tree for tree as before. A helper that lost the caller's change would still fail t0107, where following no path shows file-1, but t0108 passed without its added line, so it now looks for that line.
Compare more of the patch page with gitBryce Kwon-33/+82
The root patch was checked for its signature alone, so one that lost its diff passed. The headers, the note a path adds to the stat and a merge in a range had no test, and a renamed file's patch was grepped rather than compared. The version is read in the test that needs it, so a missing build/VERSION fails there instead of surfacing later as a mismatch.
Check which commits max-patch-count keepsBryce Kwon-9/+21
Only the number of patches was counted, so keeping the oldest two of a range would have passed. The default of 50 and the 0 that lifts the bound had no test.
Test enable-plain-email=0 where it changes outputBryce Kwon-0/+10
No test set it, though it switches the patch to a format of cgit's own and drops the address from the feed and the trailer idents.
Show a renamed file's diff as the renameBryce Kwon-0/+19
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.
Write the remaining config copies with cgitrc_copyBryce Kwon-4/+1
Write the diff and patch checks as the suite doesBryce Kwon-11/+11
Ask for a url through cgit_url everywhereBryce Kwon-3/+3
Add the shared config writers and cgit_rcBryce Kwon-2/+2
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.
Correct the test comments that went staleBryce Kwon-2/+1
Reuse the ids t0109 has already looked upBryce Kwon-2/+0
Drop the patch greps the comparisons already makeBryce Kwon-20/+0
The From, Date, Subject and signature lines are part of what the next test compares in full against git format-patch, for the single commit and for the range alike.
Offer the versions as an optionBryce Kwon-4/+14
enable-version-info brings back the cgit and git versions that 872bd7c took off the footer and the generator tag, for a site that wants them, and the version f7d2b83 put on the signature of patches now follows it too. It stays off by default for the reason 872bd7c gave.
Sign patches with the cgit versionBryce Kwon-3/+7
git format-patch ends each patch with the version of git that wrote it, and the bare "cgit" that 872bd7c left in its place said less. The version is written as git writes its own, without the v of the tag, so a release build signs with "cgit 2.9.0". The footer and the generator tag still leave versions out.
Keep the version numbers off the pagesBryce Kwon-6/+3
The generator meta, the footer and the patch signature named the exact cgit and git versions on every response, which only helps someone matching a site against an advisory. The shipped server configs already hide the server's own version for the same reason, and cgit --version still answers on the host.
Clean up the whole treeBryce Kwon-10/+5
Trim the comments and dead code across the treeBryce Kwon-19/+30
Collect test output under trash and resultsBryce Kwon-2/+2
Renumber the test scripts into themed rangesBryce Kwon-0/+0
The numbering walks outward from the ground the suite stands on. - t000x for the git version, html validity and the cache - t01xx for page content, one script per page - t02xx for filters, submodule links, dates and limits, which cut across pages - t03xx for defence, the security regressions and the $HOME promise - t04xx for the helper tools under tools/