Commit Graph

706 Commits

Author SHA1 Message Date
Lars Hjemli
a579fb0256 ui-log.c: allow commit range as search expression
Inspired-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2010-06-19 14:32:37 +02:00
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>
2010-06-19 12:20:09 +02:00
Lars Hjemli
c8bc3fc04c Merge branch 'stable' 2010-06-19 11:52:42 +02:00
Lars Hjemli
f072bc55b0 CGIT 0.8.3.2
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2010-06-19 11:50:58 +02:00
Lars Hjemli
c2766deb67 Merge branch 'ag/atom-fixes' 2010-06-19 11:42:12 +02:00
Lars Hjemli
caf0825d97 Merge branch 'lh/noweb' 2010-06-19 11:41:32 +02:00
Lars Hjemli
d6dc3aee9a Merge branch 'ml/plain-improvements-part1' 2010-06-19 11:40:34 +02:00
Lars Hjemli
9af580d8f6 Merge branch 'sn/subject-link' 2010-06-19 11:38:46 +02:00
Lars Hjemli
023d933121 Merge branch 'stable' 2010-04-08 00:50:20 +02:00
Lars Hjemli
ce761fde07 shared.c: avoid memory leak during diff
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2010-04-08 00:48:36 +02:00
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>
2010-03-22 23:46:00 +01:00
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>
2010-03-22 23:41:38 +01:00
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>
2010-02-28 22:18:00 +01:00
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>
2010-02-28 18:40:02 +01:00
Lars Hjemli
c151ce61d8 Use GIT-1.7.0
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2010-02-27 13:39:53 +01:00
Lars Hjemli
067c180435 Merge branch 'html-updates' of git://github.com/MarkLodato/cgit 2010-02-27 13:20:27 +01:00
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>
2010-02-27 13:12:55 +01:00
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>
2010-02-27 12:55:16 +01:00
Lars Hjemli
71d3ca75d1 Merge branch 'stable' 2010-02-27 12:53:27 +01:00
Daniel Milde
9bd3a7b1ea Clear the whole context
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2010-02-27 12:52:12 +01:00
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>
2010-02-27 12:47:57 +01:00
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>
2010-02-09 10:12:43 -05:00
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>
2010-02-08 23:04:41 -05:00
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>
2010-01-31 17:10:00 -05:00
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>
2010-01-31 17:08:49 -05:00
Mark Lodato
89082346d5 ui-plain: remove unused curr_rev variable
Signed-off-by: Mark Lodato <lodatom@gmail.com>
2010-01-30 23:54:39 -05:00
Lars Hjemli
547a64fbd6 Merge branch 'stable' 2009-12-12 12:09:47 +01:00
Lars Hjemli
c86e206a97 CGIT 0.8.3.1
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-12-12 12:08:14 +01:00
Martins Polakovs
24538b0727 Fix segfault on ppc when browsing tree 2009-12-12 11:56:25 +01:00
Andreas Wiese
0642435fed Add .tar.xz-snapshot support
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-12-08 22:18:11 +01:00
Lars Hjemli
4e75d7c9b9 Merge branch 'lh/remote-branches' 2009-12-08 19:34:30 +01:00
Lars Hjemli
f4f6210b4f Merge branch 'ro/ssdiff' 2009-12-08 19:32:48 +01:00
Lars Hjemli
57bb4fdb84 Merge branch 'master' of http://op-co.de/cgit 2009-12-08 18:31:07 +01:00
Lars Hjemli
5c34d96f7e Merge branch 'stable' 2009-12-08 18:30:02 +01:00
Sami Kyöstilä
f2bf0a0528 Don't crash when a repo-specific readme file is used
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-12-08 18:25:40 +01:00
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>
2009-11-28 03:44:33 +01:00
Georg Lukas
545b5a5dca cgit.css: highlight directories in tree 2009-11-28 03:07:34 +01:00
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>
2009-11-19 12:14:45 +01:00
Lars Hjemli
41934a3222 Add support for remote branches
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-11-07 19:10:58 +01:00
Lars Hjemli
e633ccf714 Merge branch 'stable' 2009-11-07 18:16:50 +01:00
Lars Hjemli
21f67e7d82 shared.c: return original errno
Noticed-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-11-07 18:08:30 +01:00
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>
2009-11-07 16:23:19 +01:00
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>
2009-11-07 15:37:11 +01:00
Lars Hjemli
4b1fee00dd Merge branch 'stable' 2009-11-07 15:35:36 +01:00
Rys Sommefeldt
8cfe4897f0 Close fd on error in readfile()
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-11-07 15:34:18 +01:00
Danijel Tašov
e34a3b5adc Nov is the correct abbreviation 2009-11-07 15:29:54 +01:00
Lars Hjemli
13032727ff ui-shared.c: prettify download links when generated from tag page
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-10-16 02:03:32 +02:00
Lars Hjemli
322a4bc309 ui-tag: make output more similar to commit view
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-10-06 20:33:04 +02:00
Alexey Nezhdanov
8cdccac758 ui-tag: add snapshot links
Signed-off-by: Alexey Nezhdanov <snakeru@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-10-06 19:26:06 +02:00
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>
2009-10-06 18:56:43 +02:00