| Age | Commit message (Collapse) | Author | Lines |
|
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.
|
|
|
|
|
|
|
|
The script name always holds a value, so the fallback after parsing
fired whenever cgitrc left virtual-root unset. The root is now set with
the other defaults, for cgitrc to replace. A die while cgitrc is read is
the one change, and its page now links the root with the trailing slash
every other page has.
|
|
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.
|
|
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.
|
|
Git's DEVELOPER=1 build turns on -Wwrite-strings as an error, and the
literals stored through plain char pointers failed cgit's own objects
there. The exec filter's argv takes the cast execvp needs once, the
way git's run-command does.
|
|
|
|
The dynamic ttl only applied when the url named a branch with h=, so
the log, tree and refs of the default branch, which never carry one,
fell back to cache-summary-ttl. The manual already gives each ttl the
scope the code now uses.
|
|
The dumb transport reads files that already sit on the disk, so a pack
copied into a slot cost that disk twice and the request a second write
of every byte. A snapshot took a slot whatever its size, so a visitor
naming distinct refs and ids could fill the cache root with archives.
cache-max-slot-size, 64 MB unless set, now serves a larger response from
the lock file and drops it, along with any expired copy it would have
replaced.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The old spellings are no longer read. enable-header and
enable-plain-email take the opposite value of the noheader and
noplainemail they replace.
|
|
A max-stats period enables the page again, as it did before v2.2.0, so
one key does both jobs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The readme is now escaped plain text unless about-filter points at the
new about-render.lua, which renders markdown, man pages and plain text
server-side. The enable-markdown setting goes away with the renderer.
|
|
|
|
The max-stats setting now only bounds the selectable periods and no
longer doubles as the enable switch.
The tree walk runs before the history walk on purpose. Releasing commit
memory while walking history resets each commit slab index, and a commit
graph lookup afterwards would read another commit slot and walk the
wrong tree. The stats fixture writes a commit graph so the tests cover
that path. The history walk bounds the window in process rather than
passing a formatted since date to setup_revisions, and parses each
commit once.
|
|
|
|
|
|
|
|
|
|
|
|
cgit had no markdown support of its own, so a readme was rendered
through an external python filter or not at all. Escaping the source
and formatting it in cgit.js keeps the work in the browser like the
blob highlighter, and the page stays readable as plain text without
scripting.
|
|
|
|
The ls_cache page printed the cache directory path and the urls other
visitors had requested, with no gate at all.
|
|
Everything the build generates now lands in build/, so a clean is a
single remove and the source tree stays free of build output.
|
|
These would be largely invalid anyway (save, I suppose, for Linux file
paths that technically can contain new lines).
The actual problem is that these get printed back out into cached -- and
trusted -- cgitrc files, and if the fields have newlines, the git-config
way of less trusted users configuring repos on a shared system can be
abused to inject newlines, which then can be used to smuggle global
options (including filters, which execute code) into the cached cgitrc.
So now, only ever duplicate up to the newline, when dealing with these
inputs.
Reported-by: Adrian Denkiewicz <adrian@doyensec.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
There's no reason to pass around function pointers. It was never used
for anything beyond one function.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
This exists for other CPU heavy operations like blame, but doesn't for
the follow functionality. Add it for that.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
Update to git version v2.53.0, this requires changes for these
upstream commits:
* bdbebe5714b25dc9d215b48efbb80f410925d7dd
refs: introduce wrapper struct for `each_ref_fn`
* 589127caa73090040200989ff4d24c3d54f473f2
packfile: move list of packs into the packfile store
* 5a5c7359f77ecd1bc4b0e172563161d602f131d3
refs: drop `current_ref_iter` hack
* b6e4cc8c32850315323961659e553d1d14591f7f
tag: support arbitrary repositories in parse_tag()
* 84f0e60b28de69d1ccb7a51b729af6202b6cf4c8
packfile: move packfile store into object source
Signed-off-by: Christian Hesse <mail@eworm.de>
|
|
Update to git version v2.51.0, this requires changes for these
upstream commits:
* 8f49151763cb81adf4bcec53c1ae67057081b02d
object-store: rename files to "odb.{c,h}"
Signed-off-by: Christian Hesse <mail@eworm.de>
|
|
Update to git version v2.47.0, this requires changes for these
upstream commits:
* e8207717f1623325fe1c95338fb03c1104ed5687
refs: add referent to each_ref_fn
Signed-off-by: Christian Hesse <mail@eworm.de>
|
|
fix error that is given because of macro overlapping cgit_filter member:
../filter.c:388:10: error: no member named '__fprintf_chk' in
'struct cgit_filter'
388 | filter->fprintf(filter, f, prefix);
| ~~~~~~ ^
/usr/include/bits/stdio2.h:92:3: note: expanded from macro 'fprintf'
92 | __fprintf_chk (stream, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
| ^
1 error generated.
Signed-off-by: Denis Pronin <dannftk@yandex.ru>
Signed-off-by: Christian Hesse <mail@eworm.de>
|
|
Update to git version v2.42.0, this requires changes for these
upstream commits:
* bc5c5ec0446895f5c4139cd470066beb3c4ac6d5
cache.h: remove this no-longer-used header
* aba070683295a20bdf4f49146384984961c794b2
path: move related function to path
* a4e7e317f8f27f861321e6eb08b9c8c0f3ab570c
config: add ctx arg to config_fn_t
Signed-off-by: Christian Hesse <mail@eworm.de>
|