AgeCommit message (Collapse)AuthorLines
Write five compound terms one way in the docsBryce Kwon-2/+2
Each takes the form its option name or most of the prose already uses, as in case-sensitive-sort and side-by-side-diffs.
Spell HTML in capitals as most of the docs doBryce Kwon-1/+1
The head section loses its capitals too, since HEAD elsewhere in the manual is git's.
Spell url the way the tree mostly doesBryce Kwon-14/+14
Names keep their own spelling, so the URL trailer and CGIT_REPO_URL stay in capitals.
Spell non-zero the way the tree doesBryce Kwon-3/+3
Say the highlighter needs Scintillua's detect()Bryce Kwon-1/+2
Catch a lexer's failure in one placeBryce Kwon-12/+9
filter_close already runs highlight under pcall and serves the escaped text when it fails, so the pcalls around detect, load and lex inside it only turned a raise into the same fallback a step earlier.
Write a session's expiry in whole secondsBryce Kwon-0/+10
On Lua 5.3 and later a length worked out with a fraction, such as 1.5 * 24 * 60 * 60, is a float, so the signed expiry came out as 1793609024.0, which validate_value refuses, and every login failed. Max-Age took the same .0, which makes a browser ignore it.
Collect an email filter's writes like the othersBryce Kwon-10/+12
Say what really differs between the auth filtersBryce Kwon-6/+8
The lookups were never the only difference, since the configuration and trim's place differ as well. The configuration is now set off by blank lines, as in the other extensions, instead of a heading.
Drop auth guards for input cgit never sendsBryce Kwon-18/+6
cgit names no repository with an empty string, never nil, so the check that the index stays up proved nothing, and auth-file in fact refuses the index too while its repos file cannot be read. A session_seconds of 0 signs a session that has expired by the time it comes back, so it needs no branch of its own in set_cookie.
Strip control characters from the location aloneBryce Kwon-18/+12
set_cookie only ever writes an empty value or a token secure_value built from url-encoded text, digits and hex, so stripping it changed nothing.
Drop the URL helpers' guards that cannot fireBryce Kwon-18/+2
Every caller hands the helpers a string, and a value with a line break is refused by validate_value whether or not CR LF is folded on the way.
Keep only the request fields the auth filters readBryce Kwon-42/+10
Seven of the twelve fields filter_open stored were never read. Naming all twelve parameters keeps the order cgit passes them in on record.
Take a signed cookie apart with one matchBryce Kwon-82/+10
The loop let a valid cookie through with a field appended, a doubled separator or a zero in front of its expiry. The payload now carries the expiry as written, so only the spelling secure_value issues verifies.
Drop the highlighter's extension fallbackBryce Kwon-47/+8
The table of extensions and the second lookup served only a Scintillua with no detect(), which now leaves every file uncoloured but escaped. The fake detect() names a lexer after the file's suffix, so every test lexer is reached through it.
Call string.match like the rest of the highlighterBryce Kwon-1/+1
Carry a man page's text as plain stringsBryce Kwon-23/+16
lpeg's constant, query and numbered captures already do what the token helpers did, and nothing ever read the tokens of an escape that draws nothing.
Take a no fill line's plain text from its nodesBryce Kwon-7/+1
Wrap a man page's font runs with the macros' helperBryce Kwon-27/+11
Reuse the digit pattern where it is spelt outBryce Kwon-2/+2
Build the block start test from the line grammarsBryce Kwon-2/+1
Count a rule among the blocks that end a paragraphBryce Kwon-7/+4
Inline the list check before indented codeBryce Kwon-6/+2
Read a setext heading's level off its captureBryce Kwon-10/+4
Build every code block in one placeBryce Kwon-17/+11
Replace a readme's NUL bytes in one substitutionBryce Kwon-19/+3
Let the dispatch serve markdown without lpegBryce Kwon-5/+0
Without lpeg both renderers stay nil, and the handler lookup already falls back to plain text for a format it has no renderer for.
Render markdown and man pages through one functionBryce Kwon-28/+18
Everything that can raise already runs inside the parse and emit pcalls, so the outer one in filter_close could only ever have sent the page a second time. The size check moves to the dispatch with it.
Drop three needless forward declarationsBryce Kwon-9/+3
Drop fallbacks for a match that cannot failBryce Kwon-3/+3
A table capture of a pattern repeated zero or more times matches every string, the empty one included, so the inline grammars never return nil.
Drop the readme hooks that nothing readsBryce Kwon-14/+7
Nothing in assets/ or in README's list of hooks reads a fenced block's data-lang or the manpage class on a man page's wrapper, so the header now names the two wrappers the stylesheet does style.
Rewrap the max-ref-count commentBryce Kwon-2/+1
Spell customisation and uncoloured the British wayBryce Kwon-1/+2
Point each hook at the other hooks hereBryce Kwon-3/+6
The cache hook named only the age-file hook, from before the commit-graph hook came.
Drop config comments that restate their lineBryce Kwon-7/+2
Say each routing fact once in the server configsBryce Kwon-20/+16
Leave the filter prefixes to the filter preambleBryce Kwon-12/+7
The preamble above the filters explains lua: and exec:, and the repo.* filter entries already read "Value is a command."
Say minutes once in the cache ttl commentsBryce Kwon-12/+9
Drop the filter note from the cgitrc headerBryce Kwon-4/+0
The filter section names about-render.lua and the source-filter itself.
Name the guarded settings in one placeBryce Kwon-5/+4
Trim the header notes in the server configsBryce Kwon-23/+7
Each config listed every header cgit sends, where only its own nosniff and strict policy on raw bytes bear on the headers set there. The list also missed Vary, and the Apache one called Apache a proxy.
Say each css and js line holds one urlBryce Kwon-3/+3
Drop the snapshot format from the query commentBryce Kwon-1/+1
A snapshot's format comes from the suffix of its filename in the path, not from the query string.
Name every default asset link in the configsBryce Kwon-11/+11
The nginx sub-path recipe moved only the stylesheet and the logo, and left the script and the icon pointing at the domain root.
Say which versions enable-version-info namesBryce Kwon-4/+3
Only the footer carries the git version. The reason the versions stay out by default is left to MANUAL, which already gives it.
Document virtual-root's default of SCRIPT_NAMEBryce Kwon-2/+2
cgit falls back to SCRIPT_NAME followed by a slash when virtual-root is unset, so its links always take the path form and none take the ?url= form the docs described.
Move scan-path below the settings it inheritsBryce Kwon-4/+5
The quick start says to uncomment scan-path, and in its old place a scanned repository missed every setting below it, among them the filters, the snapshots and the enable flags.
Keep the age hook quiet when it cannot writeBryce Kwon-5/+7
Keep the commit-graph current in an example hookBryce Kwon-0/+34
cgit's log, blame and graph pages read commits from the commit-graph when a repository has one, and its changed path filters let a walk limited to one file skip the commits that never touched it. git gc writes a graph only now and then and starts those filters only when a write asks for them, so the hook writes a split layer with them after each push.
Drop only the cache a push makes staleBryce Kwon-11/+104
The hook cleared every slot on a push to any repository. cgit writes the request a slot answers at its head, so the hook now reads it back and drops only the pushed repository's pages and the index. It finds the repository's url from scan-path or hooks.cgiturl, and with neither it clears everything as before.