AgeCommit message (Collapse)AuthorLines
Name a pinned commit with the page in the titleBryce Kwon-3/+28
Keep the login page out of search indexesBryce Kwon-3/+6
Keep a protected repository's header to itselfBryce Kwon-3/+7
The login page stands in for any page of the repository, so it named the description and owner of one the visitor may not see, including one hidden from the index. The site's own description fills the line, as on the index, so the header keeps its height.
Name the logo after the siteBryce Kwon-1/+5
Answer a submodule path with the submoduleBryce Kwon-12/+30
The tree page read the gitlink's commit as a blob, which outside the repository is a bad object id and inside it is the commit's raw text.
Lead an error page's title with the errorBryce Kwon-2/+8
The config error page had a title of its own, in the reverse order, and now takes the same one as any other 404, since its message already says the repository failed to open.
Keep the range in a large diff's patch linkBryce Kwon-3/+11
The link named only id, so for a diff between two commits it led to a patch of the newer one alone, and without an id it lost the branch as well and led to the default branch's tip.
Lead a blame page's folder crumbs to the treeBryce Kwon-2/+17
Link snapshots of a slash ref by a dashed nameBryce Kwon-4/+27
The snapshot page refuses to work a revision out of a name holding a slash, since that name becomes the top directory of the archive, so every link for a ref like release/2.0 answered 404. The ref now goes in the link as the id, and the archive unpacks into the repository's own prefix, as any snapshot asked for by id does.
Print line number anchors through one helperBryce Kwon-0/+16
Print the commit and tag dates through one helperBryce Kwon-0/+9
Print each person through one helperBryce Kwon-0/+12
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-0/+8
Start each history walk through one helperBryce Kwon-0/+8
Drop the hidden form fields' unused page argumentBryce Kwon-3/+3
Look up a request's commit in one placeBryce Kwon-0/+27
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.
Spell the signature suffix once for both filesBryce Kwon-2/+2
Open and close each page through the layout callsBryce Kwon-36/+31
Allocate formatted strings with git's xstrfmtBryce Kwon-7/+7
Keep the permission triplet beside its one callerBryce Kwon-3/+8
Keep the clone row and title docs in the headerBryce Kwon-10/+0
Keep three helpers beside their only callersBryce Kwon-62/+62
Build cgit_date_mode's result on the stackBryce Kwon-2/+1
Write the meta description in one placeBryce Kwon-6/+4
Read a title's path from the end with strrchrBryce Kwon-20/+7
Trim trailing slashes with git's strbuf helperBryce Kwon-12/+4
Build the full current url from the current urlBryce Kwon-8/+3
Fold the va_list error page into its one callerBryce Kwon-12/+4
Ask head_is_named before carrying the branchBryce Kwon-1/+1
Let self_link's fallback be a plain reporevlinkBryce Kwon-8/+2
Escape a submodule link's class like the othersBryce Kwon-6/+6
Open site and repository links through one helperBryce Kwon-24/+17
Write each query argument through one helperBryce Kwon-49/+30
Return repolink's delimiter without copying itBryce Kwon-1/+1
Drop the query-string form of every linkBryce Kwon-83/+30
The virtual root is set from SCRIPT_NAME before cgitrc is read, so it always holds a value and the ?url= and ?r= forms were never reached. The page argument of cgit_add_hidden_formfields fed only the url field, so it is unused until its callers stop passing it.
Stop leaking the host on an embedded pageBryce Kwon-3/+3
Stop leaking the short hash of an object linkBryce Kwon-7/+4
Trim a snapshot name without reading out of boundsBryce Kwon-28/+10
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.
Offer the versions as an optionBryce Kwon-1/+9
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.
Name the page first in every titleBryce Kwon-0/+10
Summary, about, log, refs, tag and stats pages shared one title, so tabs, history and search results could not tell them apart. Titles now read page, repository and site, with root-title as the site, and the description stays in the meta description, where search engines read it.
Load the scripts with deferBryce Kwon-1/+1
A plain script in the head held up parsing until it had downloaded and run, though cgit.js only acts once the document is ready. Deferred scripts still run in the order given and before DOMContentLoaded, so a site script after cgit.js can still call window.cgit.
Keep each snapshot link in one pieceBryce Kwon-0/+4
On a narrow screen the download column broke a snapshot name at a hyphen or left its signature link alone on the next line.
Show an odd pushed date rather than die on itBryce Kwon-3/+3
A date past what the system holds, a zone that is no hhmm offset, or a date earlier than its own westward offset all made git die inside show_date, which took the summary, refs, log, commit and feed pages of the repository down. They are now clamped as git's own log clamps them.
Check the id before the page chrome resolves itBryce Kwon-0/+4
The chrome renders on an error page too, where the id had just been refused for using the wider revision syntax, and then looked it up anyway. A :/pattern id walks the whole history for a match.
Cut text between characters, never inside oneBryce Kwon-7/+1
The index description was cut at a byte count, which could split a multibyte character and leave an invalid sequence on the page. Commit subjects already backed up to the start of the character, so html_ntxt now does that for every caller.
Read a negative ref count as no limitBryce Kwon-1/+1
summary-branches, summary-tags and max-ref-count already listed every ref at 0, but a negative value reached qsort as a count and crashed the summary and refs pages, and emptied the branch switcher.
Encode repository urls and the feed branchBryce Kwon-23/+23
Links built from the repository url, among them the description link on the index and the Atom and refs links, wrote it as configured, so a name holding a space, '#' or '?' broke them. The feed link in the page head did the same with the branch, which turned a '+' into a space.
Hold object sizes in size_t as git 2.55 doesBryce Kwon-2/+2
Git 2.55 moved object sizes from unsigned long to size_t. The two are the same type on 64-bit hosts, but not on a 32-bit one, where GCC 14 rejects the mismatched pointers, so cgit stopped compiling there.
Hand the about filter the tree url its links needBryce Kwon-27/+60
With nothing below the about page, a readme's relative links have to be written against the tree, and only cgit knows how this site spells the url of a tree page and which ref the readme was read from. Both reach the filter already escaped for a url, built by the same writer as cgit's own links.
Share the max-blob-size check and its refusalBryce Kwon-0/+6
Five copies of the test and four of the error page had to agree by hand. The new check pins the four refusals, which no test covered.