AgeCommit message (Collapse)AuthorLines
Show a renamed file's diff as the renameBryce Kwon-0/+13
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.
Release only finished walks, never cgit's mailmapBryce Kwon-1/+0
release_revisions frees revs->mailmap, and the log page points it at the static list cgit_mailmap returns, so every log of a repository with enable-mailmap aborted. A walk whose setup failed holds commits that are already freed, so releasing it could free them twice.
Free the revision walks' arguments and stateBryce Kwon-1/+3
Refuse pathspec magic through one helperBryce Kwon-5/+1
Start each history walk through one helperBryce Kwon-4/+2
Look up a request's commit in one placeBryce Kwon-37/+2
The diff page now names a revision that is no commit the way the request wrote it, as the other pages already did, rather than as the full id it resolved to. The helpers sit beside the error page in ui-shared.c, since shared.c prints nothing.
Allocate formatted strings with git's xstrfmtBryce Kwon-1/+1
Tidy comments on the history pagesBryce Kwon-2/+1
Build the patch and stats arguments in a strvecBryce Kwon-20/+15
Drop an unused include from the patch pageBryce Kwon-1/+0
Drop rev settings that change nothingBryce Kwon-1/+0
repo_init_revisions already sets abbrev, commit_format and show_root_diff to these values, and verbose_header is only read by log_tree_commit, which the log and stats walks never call.
Offer the versions as an optionBryce Kwon-2/+6
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/+9
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.
Hold patch and rawdiff to max-blob-sizeBryce Kwon-0/+4
Both pages hand the diff to git, whose own limit on an inlined blob is 512 MB, so a commit adding a blob the other views refuse was inflated and diffed in full. The cap is passed through to git, which shows such a blob as binary.
Remove what the version removal left behindBryce Kwon-2/+2
Keep the version numbers off the pagesBryce Kwon-1/+1
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.
Harden the page renderersBryce Kwon-12/+23
Clean up the whole treeBryce Kwon-22/+12
Trim the comments and dead code across the treeBryce Kwon-5/+3
Rename the inconsistent config keysBryce Kwon-1/+1
The old spellings are no longer read. enable-header and enable-plain-email take the opposite value of the noheader and noplainemail they replace.
Use standard HTTP reason phrasesBryce Kwon-4/+4
Restyle the sources and fix the audit's findingsBryce Kwon-46/+78
Settle the names, types and layout of the sourcesBryce Kwon-2/+2
Add max-patch-count to bound the patch viewBryce Kwon-0/+5
Point the fork's links and credits at itselfBryce Kwon-1/+1
AUTHORS now records the upstream developers as the project's history rather than as maintainers of the fork.
Reorganise into source, assets and librariesBryce Kwon-0/+0
Everything the build generates now lands in build/, so a clean is a single remove and the source tree stays free of build output.