Age | Commit message (Collapse) | Author | Files | Lines |
|
Branches are grouped into their own section to make the "this commit"
option visually distinct.
Adding this option will result in two options being marked as selected
if a branch has the same name as a commit oid. But that would cause
all sorts of other problems anyway (attempting to switch to the branch
would actually give you the commit, etc.), so let's not worry about
that.
A "permalink" link on the blob view next to the "plain" link would
probably be more discoverable, but that would only work for the blob
view. The switch UI is visible everywhere.
This patch is in use already at <https://git.qyliss.net/> and
<https://spectrum-os.org/git/>.
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Message-Id: <20200723204820.16776-1-hi@alyssa.is>
Cc: Profpatsch <mail@profpatsch.de>
Change-Id: I7e88d1231dd402e0ad764e16b28e9a51964c6293
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1382
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
|
|
Clang treats function-like macros "correctly", in that, per the C11 spec:
"Each subsequent instance of the function-like macro name followed by a (
[...] is replaced by the replacement list [...]".
Additionally, fprintf is also permitted to be defined as a function-like
macro rather than as a true function: "Any function declared in a header
may be additionally implemented as a function-like macro defined in the
header [...]". The specification then suggests surrounding the name of the
function in parens to avoid this, which is the technique we use here to avoid
the function-like macro being invoked.
The other fix here is to use uintptr_t for some arithmetic, since Git
is expecting an int as the value here and not a pointer.
|
|
|
|
|
|
Add links to symbolic link targets in tree listings, formatted like
"ls -l". Path normalization collapses any ".." components of the link.
|
|
|
|
This avoids piping binary blobs through the source-filter.
|
|
|
|
This change makes cgit pass the current repo and vpath inside of the
repo on to the about cmd, which makes it possible for it to correctly
render `tree`, `log` and other links to the same vpath.
|
|
This is instead passed in by Nix, and it confuses git on clones.
|
|
Using the DATE_DOTTIME format support in git.
|
|
This is pretty much exactly the derivation from nixpkgs, with some
things removed to reduce the closure size (e.g. the various formatters
used in the default cgit version, which are replaced by cheddar in my
setup).
|
|
If you're on tree/foo/bar, the about link will now point to
about/foo/bar.
Currently the annoying thing about this is that it will also do it for
files.
|
|
This means that individual subtrees of a repository will also have
their READMEs rendered on the about page, for example:
/foo/bar/README.md
Will render on:
/about/foo/bar/
This is useful for monorepo setups in which subtrees represent
individual projects.
|
|
Generates URLs that do not include the repository name.
On git.tazj.in, only one repository (depot) is served - hence URLs
generated by cgit need not include the name.
|
|
Imported commit '723dc8fbcb1a4609c264758eae420ee2811a2b55' as
'third_party/cgit'.
|