| Age | Commit message (Collapse) | Author | Lines |
|
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.
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
Each exec filter and snapshot compressor a fill runs inherited the slot's
lock descriptor beside the stdout it writes into. An flock lasts until
its last copy closes and nothing waits for a process a filter leaves
behind, so a fill killed before its rename could leave the slot locked,
and served stale or uncached, for as long as such a process lived.
The scan holds its lock across no exec and opens the same way so that
the two stay alike.
|
|
|
|
|
|
|
|
|
|
Xdiff hands out_line a whole line each time, as the prefix, the record
and any no-newline marker, and the fragment was already flushed before
the call returned, so nothing ever carried over to the next call.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cgit falls back to SCRIPT_NAME for virtual_root whenever cgitrc leaves
it out, so the ?url= and ?r= forms only ever reached an error page
raised while cgitrc was still being read. The page argument of
cgit_add_hidden_formfields fed only the url field, so it is unused
until its callers stop passing it.
|
|
|
|
|
|
For a url of .git, or an empty one, repo_basename stepped its index to
the byte before its buffer, read it, and would have cleared it had it
held a slash. Git's strbuf trims take the same steps safely, and they
lift the 1024-byte cap that failed the page for a longer url.
|
|
|
|
|
|
The snapshots parser already answers all with INT_MAX, so cgit.c
needed no value of its own for the same mask.
|
|
|
|
build_snapshot_setting always returns a buffer, both commit-sort values
are tested on their own, authenticate_post ends the process, and the
filters are cleaned up by the atexit handler once cmd_main returns.
|
|
|
|
|
|
Every call converted into the page encoding and dropped what came back,
and a commit's encoding is always set by the time it runs.
|
|
It opens the repository and loads its notes, while
cgit_prepare_repo_env exports the CGIT_REPO_ variables, and the two
names were one prefix apart.
|
|
|
|
|
|
The description and cgitrc readers already return when the file will
not open, a repository's description is never NULL before it is read,
and the owner lookup never went round a second time.
|
|
|
|
|
|
|
|
A filter is only closed after an open has forked it, so its pid is a
child's, and every open writes its arguments into argv afresh.
|
|
|