Commit Graph

705 Commits (47187b33be1c3de43fbed6f350ab05bc978aacd0)
 

Author SHA1 Message Date
Johan Herland 47187b33be Fix style of commit-filter links in commit-subject.
When using the commit-filter functionality to add e.g. bug tracker links to
commit messages, the style of those links is mangled by a CSS directive that
is meant to only apply to decorations that are listed on the commit-subject
line.

Fix this directive to only apply to the decorations.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years ago
Lars Hjemli c8bc3fc04c Merge branch 'stable' 14 years ago
Lars Hjemli f072bc55b0 CGIT 0.8.3.2
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years ago
Lars Hjemli c2766deb67 Merge branch 'ag/atom-fixes' 14 years ago
Lars Hjemli caf0825d97 Merge branch 'lh/noweb' 14 years ago
Lars Hjemli d6dc3aee9a Merge branch 'ml/plain-improvements-part1' 14 years ago
Lars Hjemli 9af580d8f6 Merge branch 'sn/subject-link' 14 years ago
Lars Hjemli 023d933121 Merge branch 'stable' 14 years ago
Lars Hjemli ce761fde07 shared.c: avoid memory leak during diff
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years ago
Aaron Griffin 80476b0d28 Add 'max-atom-items' config variable
This allows one to specify the items in the RSS feeds

Signed-off-by: Aaron Griffin <agriffin@datalogics.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years ago
Aaron Griffin 65ced7c009 Add all=1 query param for atom feeds
Displays all items from all branches in one feed

Signed-off-by: Aaron Griffin <agriffin@datalogics.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years ago
Lars Hjemli ff3a3b4e2b ui-tree: add link to plain view for blobs in tree listing
Suggested-by: Robert Weidlich <mail@robertweidlich.de>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years ago
Lars Hjemli 31ba37c0a4 scan-tree: add test for noweb-file in repo dir
If such a file exists, the repo is not added to the repolist.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years ago
Lars Hjemli c151ce61d8 Use GIT-1.7.0
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years ago
Lars Hjemli 067c180435 Merge branch 'html-updates' of git://github.com/MarkLodato/cgit 15 years ago
Lars Hjemli 581a0c2a54 Optionally generate verbose parent links
The new option 'enable-subject-links' must be used to enable the verbose
parent-links in commit view.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years ago
Stefan Naewe e15842af62 display subject instead of sha1 as link title of parents
Signed-off-by: Stefan Naewe <stefan.naewe@atlas-elektronik.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years ago
Lars Hjemli 71d3ca75d1 Merge branch 'stable' 15 years ago
Daniel Milde 9bd3a7b1ea Clear the whole context
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years ago
Florian Pritz 8d946079c5 ui-shared.c: fix segfault when repo is empty
PATH_INFO="/$REPONAME/commit/?id=1" QUERY_STRING="id=1" ./cgit.cgi
triggers segfault when the repository is empty and therefore
ctx.qry.head is unset

Signed-off-by: Florian Pritz <bluewind@xssn.at>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years ago
Mark Lodato a2c6355f9f html: properly percent-escape URLs
The only valid characters for a URL are unreserved characters
a-zA-Z0-9_-.~ and the reserved characters !*'();:@&=+$,/?%#[] , as per
RFC 3986.  Everything else must be escaped.  Additionally, the # and
? always have special meaning, and the &, =, and + have special meaning
in a query string, so they too must be escaped.  To make this easier,
a table of escapes is now used so that we do not have to call fmt() for
each character; if the entry is 0, no escaping is needed.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
15 years ago
Mark Lodato 8aab27f24d html: make all strings 'const char *'
None of the html_* functions modify their argument, so they can all be
'const char *' instead of a simple 'char *'.  This removes the need to
cast (or copy) when trying to print a const string.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
15 years ago
Mark Lodato 6c1a736455 ui-plain: print directory listings
When a user requests a plain view of a tree (as opposed to a blob),
print out a directory listing rather than giving a 404 Not Found.

Also, fix a segfault when ctx->qry.path is NULL - i.e, when /plain is
requested without a path.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
15 years ago
Mark Lodato 74ebf82229 ui-plain: more efficient walk_tree()
Git's read_tree_recursive() already filters out the objects by pathname,
so we only have to compare baselen to the expected.  That is, no string
matching is required.

Additionally, if the requested path is a directory, the old code would
walk through all of its immediate children.  This is not necessary, this
so we no longer do that.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
15 years ago
Mark Lodato 89082346d5 ui-plain: remove unused curr_rev variable
Signed-off-by: Mark Lodato <lodatom@gmail.com>
15 years ago
Lars Hjemli 547a64fbd6 Merge branch 'stable' 15 years ago
Lars Hjemli c86e206a97 CGIT 0.8.3.1
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years ago
Martins Polakovs 24538b0727 Fix segfault on ppc when browsing tree 15 years ago
Andreas Wiese 0642435fed Add .tar.xz-snapshot support
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years ago
Lars Hjemli 4e75d7c9b9 Merge branch 'lh/remote-branches' 15 years ago
Lars Hjemli f4f6210b4f Merge branch 'ro/ssdiff' 15 years ago
Lars Hjemli 57bb4fdb84 Merge branch 'master' of http://op-co.de/cgit 15 years ago
Lars Hjemli 5c34d96f7e Merge branch 'stable' 15 years ago
Sami Kyöstilä f2bf0a0528 Don't crash when a repo-specific readme file is used
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years ago
Georg Lukas ef07ccc72d "max-blob-size" config var to limit generated HTML size
Sometimes it is not feasible to generate the HTML pretty-print for large
files, especially if a source-filter is involved or binary data is to be
displayed. The "max-blob-size" config var allows to disable HTML output
for blobs bigger than X KBytes. Plain downloads are not affected.

Signed-off-by: Georg Lukas <georg@op-co.de>
15 years ago
Georg Lukas 545b5a5dca cgit.css: highlight directories in tree 15 years ago
Georg Lukas 56522ebe13 syntax highlighting for all formats supported by "highlight"
The highlight tool can be given any of the supported file extensions
as its -S parameter. This patch replaces the case-switch by extracting
the extension from the supplied file name and passing it to highlight.
However, this requires a shell supporting the ${var##pattern} syntax,
like dash or bash.

Unknown extensions cause a fall-back to plain text using the --force
switch. Error messages are redirected to /dev/null.

A special case maps Makefile and Makefile.* to the "mk" extension.

The total overhead is reduced by calling "exec highlight". No forks are
needed during script execution.

Signed-off-by: Georg Lukas <georg@op-co.de>
15 years ago
Lars Hjemli 41934a3222 Add support for remote branches
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years ago
Lars Hjemli e633ccf714 Merge branch 'stable' 15 years ago
Lars Hjemli 21f67e7d82 shared.c: return original errno
Noticed-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years ago
Mikhail Gusarov 59310ab102 Add NO_OPENSSL option
Linking with OpenSSL is not always desirable. Add NO_OPENSSL option
to use SHA-1 code bundled with Git.

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
15 years ago
Ragnar Ouchterlony 735e15e38a In side-by-side diff, add support for marking individual characters.
Refuses to do so if the left hand side of the diff has different amount of
differing lines to the right hand side to avoid confusion.

Note that I use the naive dynamic programming approach for calculating the
longest common subsequence. We could probably be more efficient by using a
better algorithm. The LCS calculating function is O(n*m) and uses up n*m
amount of memory too (so if we we compare two strings of length 100, I use
an array of 10000 for calculating the LCS). Might want to not calculate LCS
if the length of the line is too large.

Signed-off-by: Ragnar Ouchterlony <ragnar@lysator.liu.se>
15 years ago
Lars Hjemli 4b1fee00dd Merge branch 'stable' 15 years ago
Rys Sommefeldt 8cfe4897f0 Close fd on error in readfile()
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years ago
Danijel Tašov e34a3b5adc Nov is the correct abbreviation 15 years ago
Lars Hjemli 13032727ff ui-shared.c: prettify download links when generated from tag page
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years ago
Lars Hjemli 322a4bc309 ui-tag: make output more similar to commit view
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years ago
Alexey Nezhdanov 8cdccac758 ui-tag: add snapshot links
Signed-off-by: Alexey Nezhdanov <snakeru@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years ago
Stefan Bühler 121898e73d Skip leading "/" in url querystring value
Makes it easier to rewrite :)
lighttpd-sandbox: rewrite "/cgit.cgi?url=%{enc:request.path}&%{request.query}";

Signed-off-by: Stefan Bühler <source@stbuehler.de>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years ago
Geoff Johnstone 9735835c0e Fix repolist search links with virtual root
Signed-off-by: Geoff Johnstone <geoff.johnstone@googlemail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years ago