AgeCommit message (Collapse)AuthorLines
Say why the build leaves out Lua and what to doBryce Kwon-1/+15
A LUA_PKGCONFIG that pkg-config could not resolve, with no LUA_LIBS or LUA_CFLAGS given, still claimed to link with it and then failed on lua.h, and a build that found no pkg-config dropped Lua with no hint of why. A warning rather than an error lets the build go on, since flags supplied another way, such as CGIT_LIBS in cgit.conf, may still make it link.
Log the path of a repository that will not openBryce Kwon-0/+9
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-14/+39
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-70/+136
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-6/+33
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-1/+2
"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-4/+14
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-5/+59
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.
Log an owner lookup only when it failsBryce Kwon-2/+6
getpwuid leaves errno alone for a uid with no passwd entry, so a scan logged "Unable to read the owner" with "Success" as the reason for each repository such a uid owns.
Reset the repository title before reusing itBryce Kwon-1/+3
Release only finished walks, never cgit's mailmapBryce Kwon-4/+4
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.
Find Lua under the BSDs' package namesBryce Kwon-1/+4
Keep the repository title in one static bufferBryce Kwon-2/+6
Free the revision walks' arguments and stateBryce Kwon-6/+13
Spell non-zero the way the rest of the tree doesBryce Kwon-1/+1
Drop a query value check that cannot fireBryce Kwon-3/+0
Check a ref path without copying itBryce Kwon-10/+4
Share one lock-file helper between the cachesBryce Kwon-64/+58
Keep the script name local to prepare_contextBryce Kwon-5/+1
Print line number anchors through one helperBryce Kwon-39/+31
Print the commit and tag dates through one helperBryce Kwon-10/+21
Print each person through one helperBryce Kwon-44/+30
The log, refs and tag pages no longer open a filter of their own, so they stop including filter.h.
Refuse pathspec magic through one helperBryce Kwon-21/+19
Start each history walk through one helperBryce Kwon-18/+20
Order shared.c the way shared.h declares itBryce Kwon-147/+144
The header's blob and pathspec checks move after the diff wrappers so each group reads as one, and each static helper now sits directly above its only user.
Free commit and tag records beside their parsersBryce Kwon-34/+30
With the frees gone from shared.h, five page files need nothing else from it, so they stop including it.
Keep the cache's trailing slash helper in cache.cBryce Kwon-10/+12
Move cgit.c's own helpers out of shared.cBryce Kwon-86/+78
Move the mimetype lookup into ui-plain.cBryce Kwon-52/+50
Move the ref list code into ui-refs.cBryce Kwon-88/+85
Move the die wrappers into filter.cBryce Kwon-34/+30
Drop the hidden form fields' unused page argumentBryce Kwon-6/+6
Leave the log's history simplification to gitBryce Kwon-1/+0
Spell the version banner cgitBryce Kwon-1/+1
Build a literal pathspec in one placeBryce Kwon-62/+35
Git's pathspec item holds a const string now, so a path needs no writable copy to be matched.
Look up a request's commit in one placeBryce Kwon-88/+56
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.
Count the log's columns in ui-log.c aloneBryce Kwon-22/+21
Spell the signature suffix once for both filesBryce Kwon-4/+5
Drop ui-blob's constant file_only argumentsBryce Kwon-13/+13
Keep a commit's encoding local to its parserBryce Kwon-11/+11
Keep the query string parser beside its one callerBryce Kwon-19/+17
Drop cgit_read_first_line's unread size outputBryce Kwon-9/+5
Inline the repository list's description linkBryce Kwon-24/+4
Return nothing from html_includeBryce Kwon-15/+4
No caller reads the result, and a void html_include fits the Lua binding's callback as it is, so the wrapper that dropped it goes too.
Open and close each page through the layout callsBryce Kwon-51/+37
Sort with git's QSORTBryce Kwon-21/+9
QSORT skips a list of fewer than two entries, so an empty list's null base never reaches qsort, which is what cgit_qsort was written for.
Allocate formatted strings with git's xstrfmtBryce Kwon-30/+15
Let go of a slot lock that cannot take its keyBryce Kwon-0/+3
A failed truncate or key write returned with the descriptor still open, so the lock was held while the page rendered uncached and the file was left behind. It is removed before its last close, as every holder does.
Keep lock contention out of the error logBryce Kwon-11/+25
process_slot logged every failure to lock, so each request that found its slot being filled left a line, while refresh_slot logged none, so an expired slot in a directory the server cannot write was served stale for good without a word. lock_slot now logs the step that failed, as the scan does, and leaves out only another request at work.
Lock the cached repolist with flockBryce Kwon-9/+4
The slot lock has to be an flock, since an exec filter drops a record lock when it closes the stdout a fill writes through. The scan only got by with fcntl because nothing reopens its file while it runs. One kind of lock lets the two share their code, and on Linux, where the kinds never see each other, an flock on the scan's file now holds a scan off like any other.