]> granicus.if.org Git - cgit/log
cgit
14 years agoCGIT 0.8.3.4 v0.8.3.4
Lars Hjemli [Mon, 27 Sep 2010 06:00:47 +0000 (08:00 +0200)]
CGIT 0.8.3.4

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoUse GIT-1.7.3
Lars Hjemli [Mon, 27 Sep 2010 05:58:01 +0000 (07:58 +0200)]
Use GIT-1.7.3

This fixes http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-2542.

Noticed-by: Silvio Cesare <silvio.cesare@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoRSS items should always use UTC times
Aaron Griffin [Wed, 15 Sep 2010 15:16:33 +0000 (10:16 -0500)]
RSS items should always use UTC times

The format uses a 'Z' suffix, which indicates no TZ offset.
Thus we should not respect the local-time config setting here.

Signed-off-by: Aaron Griffin <agriffin@datalogics.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoui-snapshot: actually compress zip archives
Lars Hjemli [Wed, 1 Sep 2010 12:13:12 +0000 (12:13 +0000)]
ui-snapshot: actually compress zip archives

Since cgit linked with git-1.6.0 all zip archives has been uncompressed.
This patch fixes the issue by specifying Z_DEFAULT_COMPRESSION.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agohtml: fix strcpy bug in convert_query_hexchar
Mark Lodato [Sat, 28 Aug 2010 01:02:27 +0000 (21:02 -0400)]
html: fix strcpy bug in convert_query_hexchar

The source and destination strings in strcpy() may not overlap.
Instead, use memmove(), which allows overlap.  This fixes test t0104,
where 'url=foo%2bbar/tree' was being parsed improperly.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
14 years agot0108-patch: add 'tests_done' to end
Mark Lodato [Fri, 27 Aug 2010 02:02:03 +0000 (22:02 -0400)]
t0108-patch: add 'tests_done' to end

Signed-off-by: Mark Lodato <lodatom@gmail.com>
14 years agoCGIT 0.8.3.3 v0.8.3.3
Lars Hjemli [Tue, 3 Aug 2010 20:50:02 +0000 (22:50 +0200)]
CGIT 0.8.3.3

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoui-refs.c: avoid segfault on unparsed ref objects
Lars Hjemli [Tue, 3 Aug 2010 20:06:21 +0000 (22:06 +0200)]
ui-refs.c: avoid segfault on unparsed ref objects

When a ref refers to something other then a commit or tag object, cgit
could segfault when trying to display the tag info.

Noticed-by: Eugene Sajine <euguess@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoReencode author and committer
Rémi Lagacé [Tue, 13 Jul 2010 17:15:09 +0000 (19:15 +0200)]
Reencode author and committer

When a commit has a specific encoding, this encoding also applies to
the author and committer name and email.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoCGIT 0.8.3.2 v0.8.3.2
Lars Hjemli [Sat, 19 Jun 2010 09:50:58 +0000 (11:50 +0200)]
CGIT 0.8.3.2

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoshared.c: avoid memory leak during diff
Lars Hjemli [Wed, 7 Apr 2010 22:48:36 +0000 (00:48 +0200)]
shared.c: avoid memory leak during diff

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoClear the whole context
Daniel Milde [Sun, 21 Feb 2010 13:38:59 +0000 (14:38 +0100)]
Clear the whole context

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years agoui-shared.c: fix segfault when repo is empty
Florian Pritz [Mon, 1 Feb 2010 16:55:37 +0000 (17:55 +0100)]
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 agoCGIT 0.8.3.1 v0.8.3.1
Lars Hjemli [Sat, 12 Dec 2009 11:08:14 +0000 (12:08 +0100)]
CGIT 0.8.3.1

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoFix segfault on ppc when browsing tree
Martins Polakovs [Thu, 10 Dec 2009 15:35:42 +0000 (17:34 +0159)]
Fix segfault on ppc when browsing tree

15 years agoDon't crash when a repo-specific readme file is used
Sami Kyöstilä [Tue, 8 Dec 2009 17:18:10 +0000 (18:18 +0100)]
Don't crash when a repo-specific readme file is used

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoshared.c: return original errno
Lars Hjemli [Sat, 7 Nov 2009 17:08:30 +0000 (18:08 +0100)]
shared.c: return original errno

Noticed-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoClose fd on error in readfile()
Rys Sommefeldt [Sat, 7 Nov 2009 14:24:45 +0000 (15:24 +0100)]
Close fd on error in readfile()

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoNov is the correct abbreviation
Danijel Tašov [Mon, 2 Nov 2009 21:10:04 +0000 (22:10 +0100)]
Nov is the correct abbreviation

15 years agoFix repolist search links with virtual root
Geoff Johnstone [Sun, 20 Sep 2009 10:32:07 +0000 (11:32 +0100)]
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 agocgitrc.5.txt: Change repo.group to section in example config.
Loui Chang [Mon, 14 Sep 2009 05:21:11 +0000 (01:21 -0400)]
cgitrc.5.txt: Change repo.group to section in example config.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agocgitrc.5.txt: Add mansource and manmanual.
Loui Chang [Mon, 14 Sep 2009 05:21:10 +0000 (01:21 -0400)]
cgitrc.5.txt: Add mansource and manmanual.

This prevents FIXMEs from appearing.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoCGIT 0.8.3 v0.8.3
Lars Hjemli [Sun, 13 Sep 2009 20:17:02 +0000 (22:17 +0200)]
CGIT 0.8.3

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoMerge branch 'stable'
Lars Hjemli [Sun, 13 Sep 2009 20:15:38 +0000 (22:15 +0200)]
Merge branch 'stable'

15 years agoCGIT 0.8.2.2 v0.8.2.2
Lars Hjemli [Sun, 13 Sep 2009 20:14:12 +0000 (22:14 +0200)]
CGIT 0.8.2.2

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoMerge branch 'lh/repo-scan'
Lars Hjemli [Sun, 13 Sep 2009 20:02:07 +0000 (22:02 +0200)]
Merge branch 'lh/repo-scan'

15 years agoMerge branch 'fp/linenumbers'
Lars Hjemli [Sun, 13 Sep 2009 20:01:52 +0000 (22:01 +0200)]
Merge branch 'fp/linenumbers'

15 years agoUse GIT-1.6.4.3
Lars Hjemli [Sun, 13 Sep 2009 19:56:45 +0000 (21:56 +0200)]
Use GIT-1.6.4.3

Signed-off-by: Lars Hjemli <larsh@slackbox.hjemli.net>
15 years agoMerge branch 'stable'
Lars Hjemli [Sun, 6 Sep 2009 17:33:27 +0000 (19:33 +0200)]
Merge branch 'stable'

15 years agoui-plain.c: only return the blob with the specified path
Lars Hjemli [Sun, 6 Sep 2009 17:33:10 +0000 (19:33 +0200)]
ui-plain.c: only return the blob with the specified path

When a path to a directory was specified for the 'plain'
view, each blob in the directory used to be returned to
the client. This patch fixes the issue by matching the
path of each blob against the requested path.

Noticed-by: Lars Stoltenow <penma@penma.de>
Signed-off-by: Lars Hjemli <larsh@slackbox.hjemli.net>
15 years agocgit.c: respect repo-local 'snapshots' option for --scan-path
Lars Hjemli [Mon, 24 Aug 2009 11:31:49 +0000 (13:31 +0200)]
cgit.c: respect repo-local 'snapshots' option for --scan-path

The repo-specific 'snapshots' option is bitwise AND'ed with the global
'snapshots' option during parsing, and since the global cgitrc hasn't
been parsed when --scan-path is processed the global 'snapshots' will
always be 0 (i.e. no repo-specific 'snapshots' setting will have any
effect).

This patch fixes the issue by setting the global 'snapshots' mask to
0xFF (hence relying on later parsing of the generated cgitrc repolist
to do the right thing).

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agocgit.c: only print first line of repo.desc in print_repo()
Lars Hjemli [Mon, 24 Aug 2009 11:27:15 +0000 (13:27 +0200)]
cgit.c: only print first line of repo.desc in print_repo()

Since repo.desc might have been populated by reading the 'description'
file in GIT_DIR, it may contain newlines. And by printing the literal
value, we may then generate an invalid cgitrc include-file.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoAdd and use cgit_find_stats_periodname() in print_repo()
Lars Hjemli [Mon, 24 Aug 2009 09:02:48 +0000 (11:02 +0200)]
Add and use cgit_find_stats_periodname() in print_repo()

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agocgit.c: generate repo.snapshots in print_repo()
Lars Hjemli [Mon, 24 Aug 2009 08:55:01 +0000 (10:55 +0200)]
cgit.c: generate repo.snapshots in print_repo()

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agocgit.c: add missing options to print_repo()
Lars Hjemli [Mon, 24 Aug 2009 08:22:21 +0000 (10:22 +0200)]
cgit.c: add missing options to print_repo()

Note: print_repo() still ignores repo.max-stats and repo.snapshots,
which both requires additional work since these settings are represented
internally as an enum and a bitmap.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoshared.c: initialize cgit_repo structs properly
Lars Hjemli [Mon, 24 Aug 2009 08:14:02 +0000 (10:14 +0200)]
shared.c: initialize cgit_repo structs properly

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoAdd config option 'enable-filter-overrides'
Lars Hjemli [Mon, 24 Aug 2009 06:53:21 +0000 (08:53 +0200)]
Add config option 'enable-filter-overrides'

This option must be enabled if repo-specific cgitrc files should be
allowed to override any of the 'filter' options.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agocgitrc.5.txt: fix markup errors
Lars Hjemli [Mon, 24 Aug 2009 05:51:48 +0000 (07:51 +0200)]
cgitrc.5.txt: fix markup errors

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoui-repolist: handle empty sections similar to NULL sections
Lars Hjemli [Mon, 24 Aug 2009 05:42:03 +0000 (07:42 +0200)]
ui-repolist: handle empty sections similar to NULL sections

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoAdd support for repo-local cgitrc file
Lars Hjemli [Sun, 23 Aug 2009 22:04:58 +0000 (00:04 +0200)]
Add support for repo-local cgitrc file

When recursively scanning a directory tree looking for git repositories,
cgit will now parse cgitrc files found within such repositories.

The repo-specific config files can include any repo-specific options
except 'repo.url' and 'repo.path'. Also, in such config files the 'repo.'
prefix can not be used, i.e. the valid options then becomes:
* name
* clone-url
* desc
* ower
* defbranch
* snapshots
* enable-log-filecount
* enable-log-linecount
* max-stats
* module-link
* section
* about-filter
* commit-filter
* source-filter
* readme

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agocgit.c: refactor repo_config() from config_cb()
Lars Hjemli [Sun, 23 Aug 2009 21:23:20 +0000 (23:23 +0200)]
cgit.c: refactor repo_config() from config_cb()

The new function repo_config() is used to handle all 'simple' repo
options, for the following reasons:
* code readability
* parser performance
* upcoming support for repo-local cgitrc files during scanning

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoui-repolist.c: sort by section name, repo name as default
Lars Hjemli [Sun, 23 Aug 2009 21:09:31 +0000 (23:09 +0200)]
ui-repolist.c: sort by section name, repo name as default

When no sorting is requested by the client, cgit will now sort by
section name followed by repo name. This allows repos to be registered/
discovered independently of their display order.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoAdd config option 'repo.section'
Lars Hjemli [Sun, 23 Aug 2009 21:00:28 +0000 (23:00 +0200)]
Add config option 'repo.section'

This option can be used to specify the section name for the current
repository.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoIntroduce 'section' as canonical spelling for 'repo.group'
Lars Hjemli [Sun, 23 Aug 2009 20:58:39 +0000 (22:58 +0200)]
Introduce 'section' as canonical spelling for 'repo.group'

The 'repo.' prefix should be reserved for repo-specific options, but
the option 'repo.group' must still be honored to stay backwards
compatible.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoAdd support for --scan-path command line option
Lars Hjemli [Sun, 23 Aug 2009 17:36:45 +0000 (19:36 +0200)]
Add support for --scan-path command line option

This is an alias for --scan-tree (which might be deprecated in the
future).

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoRename 'repo.scan' to 'scan-path'
Lars Hjemli [Sun, 23 Aug 2009 17:35:56 +0000 (19:35 +0200)]
Rename 'repo.scan' to 'scan-path'

The 'repo.' prefix will soon be reserved for repo-specific config
options.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agocgitrc.5.txt: document repo.scan and cache-scanrc-ttl
Lars Hjemli [Thu, 20 Aug 2009 15:42:14 +0000 (17:42 +0200)]
cgitrc.5.txt: document repo.scan and cache-scanrc-ttl

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agocgit.c: add support for caching autodetected repositories
Lars Hjemli [Thu, 20 Aug 2009 15:41:54 +0000 (17:41 +0200)]
cgit.c: add support for caching autodetected repositories

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agocgit.c: make print_repolist() and print_repo() reusable for caching
Lars Hjemli [Wed, 19 Aug 2009 15:47:24 +0000 (17:47 +0200)]
cgit.c: make print_repolist() and print_repo() reusable for caching

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agocache.h: export hash_str()
Lars Hjemli [Wed, 19 Aug 2009 15:43:47 +0000 (17:43 +0200)]
cache.h: export hash_str()

This function will be reused to cache the result of tree scanning.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agocgit.c: add support for cgitrc option 'repo.scan'
Lars Hjemli [Tue, 11 Aug 2009 08:09:06 +0000 (10:09 +0200)]
cgit.c: add support for cgitrc option 'repo.scan'

When specified, the specified path will be scanned for repositories.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoscan-tree: detect non-bare repository and stop scanning early
Lars Hjemli [Tue, 11 Aug 2009 08:08:12 +0000 (10:08 +0200)]
scan-tree: detect non-bare repository and stop scanning early

We don't want to descend into every subdirectory of a git repository
with a workdir.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agocgitrc.5.txt: fix description and markup for 'snapshots' option
Lars Hjemli [Mon, 24 Aug 2009 06:00:37 +0000 (08:00 +0200)]
cgitrc.5.txt: fix description and markup for 'snapshots' option

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agocgit.css: make the blob display in tree view a bit prettier
Lars Hjemli [Fri, 21 Aug 2009 12:37:50 +0000 (14:37 +0200)]
cgit.css: make the blob display in tree view a bit prettier

Adding some padding to the linenumbers while right-aligning them and
removing the background color makes the page more readable.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoRename "linenumbers" to "enable-tree-linenumbers", change default to "1"
Lars Hjemli [Fri, 21 Aug 2009 12:26:52 +0000 (14:26 +0200)]
Rename "linenumbers" to "enable-tree-linenumbers", change default to "1"

This makes the name of the cgitrc option more descriptive and at the
same time changes the default from "0" to "1" in an attempt to stay
backwards compatible - prior to the introduction of "source-filter"
and "linenumbers", cgit always generated linenumber links in the
tree view, but now this feature can be turned off (one might want to
do this if the source-filter performs line-wrapping etc).

While at it, the documentation is updated to match the surrounding
descriptions.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoAdd 'linenumbers' config option
Florian Pritz [Sun, 9 Aug 2009 20:42:45 +0000 (20:42 +0000)]
Add 'linenumbers' config option

Signed-off-by: Florian Pritz <bluewind@xssn.at>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoui-tree.c: show line numbers when highlighting
Florian Pritz [Sun, 9 Aug 2009 13:43:18 +0000 (13:43 +0000)]
ui-tree.c: show line numbers when highlighting

When source-filter is enabled, cgit currently will not display
linenumbers in the tree view. This patch restores the linenumber
function.

Signed-off-by: Florian Pritz <bluewind@xssn.at>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoscan-tree: split the pw_gecos field at the ',' to get the real name
Stefan Naewe [Thu, 20 Aug 2009 06:24:51 +0000 (08:24 +0200)]
scan-tree: split the pw_gecos field at the ',' to get the real name

Signed-off-by: Stefan Naewe <stefan.naewe@atlas-elektronik.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agocgit.c: fix caching keyed on PATH_INFO with no QUERY_STRING
Lars Hjemli [Thu, 20 Aug 2009 08:07:51 +0000 (10:07 +0200)]
cgit.c: fix caching keyed on PATH_INFO with no QUERY_STRING

When generating a hash for caching, ctx.qry.raw is used as key. And
since cgit_parse_url() zero-terminates it's argument (after the repo
path), ctx.qry.raw must xstrdup(ctx.qry.url).

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoAdd and use a common readfile() function
Lars Hjemli [Tue, 18 Aug 2009 15:17:41 +0000 (17:17 +0200)]
Add and use a common readfile() function

This function is used to read the full content of a textfile into a
newly allocated buffer (with zerotermination).

It replaces the earlier readfile() in scan-tree.c (which was rather
error-prone[1]), and is reused by read_agefile() in ui-repolist.c.

1: No checks for EINTR and EAGAIN, fixed-size buffer

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoMerge branch 'stable'
Lars Hjemli [Tue, 18 Aug 2009 15:21:52 +0000 (17:21 +0200)]
Merge branch 'stable'

15 years agotruncate buffer before reading empty files
Simon Arlott [Sat, 7 Mar 2009 00:06:24 +0000 (00:06 +0000)]
truncate buffer before reading empty files

If readfile() reads an empty file, fgets() won't truncate the buffer
and it'll still contain the contents of the previously read file.

[lh: fixed similar issue in ui-repolist.c]

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoMerge branch 'stable'
Lars Hjemli [Tue, 18 Aug 2009 11:14:11 +0000 (13:14 +0200)]
Merge branch 'stable'

15 years agoui-shared: don't print header <img/> if there isn't a logo defined
Matthew Metnetsky [Tue, 30 Jun 2009 01:27:51 +0000 (21:27 -0400)]
ui-shared: don't print header <img/> if there isn't a logo defined

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoMerge branch 'stable'
Lars Hjemli [Mon, 17 Aug 2009 08:17:23 +0000 (10:17 +0200)]
Merge branch 'stable'

15 years agocgit.c: do not segfault on unexpected query-string format
Lars Hjemli [Mon, 17 Aug 2009 07:05:13 +0000 (09:05 +0200)]
cgit.c: do not segfault on unexpected query-string format

The querystring_cb() function will be invoked with a NULL value when
the querystring contains a name not followed by a '='. Such a value
used to cause a segfault, which this patch fixes.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoui-tag.c: do not segfault when id is missing from query-string
Lars Hjemli [Mon, 17 Aug 2009 07:19:05 +0000 (09:19 +0200)]
ui-tag.c: do not segfault when id is missing from query-string

The purpose of the tag page is to print info about a specific tag,
but if no tag was specified on the query-string cgit used to segfault.

With this patch, cgit will fallback to the value of the 'h' parameter
instead (which is never NULL due to prepare_repo_cmd() in cgit.c).

It will now also verify that the specified tagname is in fact a valid
ref in the 'refs/tags/' namespace, i.e. specifying 'id=master' will
trigger a 'Bad tag reference' error.

Noticed-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoui-log.c: handle lightweight tags when printing commit decorations
Lars Hjemli [Sun, 16 Aug 2009 17:52:27 +0000 (19:52 +0200)]
ui-log.c: handle lightweight tags when printing commit decorations

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoui-refs.c: improve handling of lightweight tags
Stefan Bühler [Sun, 16 Aug 2009 17:35:18 +0000 (19:35 +0200)]
ui-refs.c: improve handling of lightweight tags

When a lightweight tag is referencing a commit object, cgit now uses
the commit date when comparing tag age. Also, the commitdate and author
info is printed in the refs view, making lightweight tags appear similar
to annotated tags.

Signed-off-by: Stefan Bühler <lighttpd@stbuehler.de>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoUse GIT-1.6.3.4
Lars Hjemli [Thu, 13 Aug 2009 05:11:41 +0000 (07:11 +0200)]
Use GIT-1.6.3.4

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoMerge branch 'lh/embedded'
Lars Hjemli [Tue, 11 Aug 2009 08:12:53 +0000 (10:12 +0200)]
Merge branch 'lh/embedded'

15 years agoui-shared: add support for header/footer options when embedded=1
Lars Hjemli [Tue, 11 Aug 2009 08:12:35 +0000 (10:12 +0200)]
ui-shared: add support for header/footer options when embedded=1

When embedded=1, cgit used to ignore the header and footer options.
But honoring these options when embedded=1 makes it possible to "frame"
the html fragment generated by cgit with any kind of static content,
i.e. it should become easier to integrate cgit with site-specfic
layouts.

Original-patch-by: Mark Constable <markc@renta.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agocgitrc.5.txt: describe where/how cgit will locate cgitrc
Lars Hjemli [Mon, 10 Aug 2009 16:58:29 +0000 (18:58 +0200)]
cgitrc.5.txt: describe where/how cgit will locate cgitrc

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agocgit.c: make '/cgit.png' the default value for 'logo' option
Lars Hjemli [Mon, 10 Aug 2009 16:14:12 +0000 (18:14 +0200)]
cgit.c: make '/cgit.png' the default value for 'logo' option

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agocgit.css: align commit message with subject in expanded log listing
Lars Hjemli [Mon, 10 Aug 2009 16:03:31 +0000 (18:03 +0200)]
cgit.css: align commit message with subject in expanded log listing

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoui-shared: add support for NO_HTTP=1/--nohttp
Lars Hjemli [Mon, 10 Aug 2009 07:20:17 +0000 (09:20 +0200)]
ui-shared: add support for NO_HTTP=1/--nohttp

cgit_print_http_headers() used to do nothing if 'embedded' was
specified in cgitrc, but that was wrong - we never want to skip the
headers when invoked as a CGI app. Sadly, there's no easy way to
detect if we're invoked as a CGI app or if we're invoked by another
CGI app, so for the latter case cgit needs to be invoked with either
--nohttp on the command line or NO_HTTP=1 in the environment.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoCleanup handling of environment variables
Lars Hjemli [Mon, 10 Aug 2009 06:21:09 +0000 (08:21 +0200)]
Cleanup handling of environment variables

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoAdd some example filter scripts
Lars Hjemli [Sun, 9 Aug 2009 12:56:23 +0000 (14:56 +0200)]
Add some example filter scripts

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoMerge branch 'lh/about'
Lars Hjemli [Sun, 9 Aug 2009 11:46:34 +0000 (13:46 +0200)]
Merge branch 'lh/about'

Conflicts:
cgit.h

15 years agoMerge branch 'lh/plugins'
Lars Hjemli [Sun, 9 Aug 2009 11:46:01 +0000 (13:46 +0200)]
Merge branch 'lh/plugins'

Conflicts:
cgit.c
cgit.h

15 years agoMerge branch 'lh/mimetypes'
Lars Hjemli [Sun, 9 Aug 2009 11:45:36 +0000 (13:45 +0200)]
Merge branch 'lh/mimetypes'

15 years agoAdd 'about-filter' and 'repo.about-filter' options
Lars Hjemli [Sun, 9 Aug 2009 11:27:21 +0000 (13:27 +0200)]
Add 'about-filter' and 'repo.about-filter' options

These options can be used to execute a filter command on each about-page,
both top-level and for each repository (repo.about-filter can be used
to override the current about-filter).

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoui-summary: enable arbitrary paths below repo.readme
Lars Hjemli [Sun, 9 Aug 2009 09:50:34 +0000 (11:50 +0200)]
ui-summary: enable arbitrary paths below repo.readme

This change makes it possible to include any number of pages below
the 'about' tab for a repository. The path is assumed to be located
in the same directory as the 'repo.readme' file.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agocgit.c: allow repo.*-filter options to unset the current default
Lars Hjemli [Sun, 9 Aug 2009 11:39:44 +0000 (13:39 +0200)]
cgit.c: allow repo.*-filter options to unset the current default

If e.g. repo.commit-filter is specified as an empty string, this
is now properly handled as disabling the global commit-filter setting
for the current repository.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoAdd support for repo.commit-filter and repo.source-filter
Lars Hjemli [Sun, 9 Aug 2009 11:22:00 +0000 (13:22 +0200)]
Add support for repo.commit-filter and repo.source-filter

These options can be used to override the default commit- and source-
filter settings per repository.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoExpose file extension in tree lists as class to allow nicer tree styling
Martin Szulecki [Fri, 7 Aug 2009 12:06:02 +0000 (14:06 +0200)]
Expose file extension in tree lists as class to allow nicer tree styling

Signed-off-by: Martin Szulecki <opensuse@sukimashita.com>
15 years agoIntroduce noplainemail option to hide email adresses from spambots
Martin Szulecki [Fri, 7 Aug 2009 12:05:17 +0000 (14:05 +0200)]
Introduce noplainemail option to hide email adresses from spambots

Signed-off-by: Martin Szulecki <opensuse@sukimashita.com>
15 years agoui-commit: add support for 'commit-filter' option
Lars Hjemli [Fri, 31 Jul 2009 15:42:57 +0000 (17:42 +0200)]
ui-commit: add support for 'commit-filter' option

This new option specifies a filter which is executed on the commit
message, i.e. the commit message is written to the filters STDIN and
the filters STDOUT is included verbatim as the commit message.

This can be used to implement commit linking by creating a simple
shell script in e.g. /usr/bin/cgit-commit-filter.sh like this:

#/bin/sh
sed -re 's|\b([0-9a-fA-F]{6,40})\b|<a href="./?id=\1">\1</a>|g'

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoui-tree: add support for source-filter option
Lars Hjemli [Fri, 31 Jul 2009 14:55:27 +0000 (16:55 +0200)]
ui-tree: add support for source-filter option

This new option is used to specify an external command which will be
executed when displaying blob content in the tree view. Blob content
will be written to STDIN of the filter and STDOUT from the filter
will be included verbatim in the html output from cgit. The file name
of the blob will be passed as the only argument to the filter command.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoui-snapshot: use cgit_{open|close}_filter() to execute compressors
Lars Hjemli [Fri, 31 Jul 2009 13:52:57 +0000 (15:52 +0200)]
ui-snapshot: use cgit_{open|close}_filter() to execute compressors

This simplifies the code in ui-snapshot.c and makes the test-suite
verify the new filter-functions.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoAdd generic filter/plugin infrastructure
Lars Hjemli [Fri, 31 Jul 2009 15:38:38 +0000 (17:38 +0200)]
Add generic filter/plugin infrastructure

The functions cgit_open_filter() and cgit_close_filter() can be used to
execute filters on the output stream from cgit.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoAdd support for mime type registration and lookup
Lars Hjemli [Fri, 13 Feb 2009 19:43:30 +0000 (20:43 +0100)]
Add support for mime type registration and lookup

This patch makes it possible to register mappings from filename
extension to mime type in cgitrc and use this mapping when returning
blob content in `plain` view.

The reason for adding this mapping to cgitrc (as opposed to parsing
something like /etc/mime.types) is to allow quick lookup of a limited
number of filename extensions (/etc/mime-types on my machine currently
contains over 700 entries).

NB: A nice addition to this patch would be to parse /etc/mime.types
when `plain` view is requested for a file with an extension for which
there is no mapping registered in cgitrc.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoMerge branch 'lh/embedded'
Lars Hjemli [Sat, 25 Jul 2009 10:29:22 +0000 (12:29 +0200)]
Merge branch 'lh/embedded'

Conflicts:
cgitrc.5.txt
ui-shared.c

15 years agocgit.h: keep config flags sorted
Lars Hjemli [Sat, 25 Jul 2009 10:25:06 +0000 (12:25 +0200)]
cgit.h: keep config flags sorted

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agocgitrc.5.txt: document 'embedded' and 'noheader'
Lars Hjemli [Sat, 25 Jul 2009 10:23:30 +0000 (12:23 +0200)]
cgitrc.5.txt: document 'embedded' and 'noheader'

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoAdd support for 'noheader' option
Lars Hjemli [Sat, 25 Jul 2009 10:19:31 +0000 (12:19 +0200)]
Add support for 'noheader' option

This option can be used to disable the standard cgit page header, which
might be useful in combination with the 'embedded' option.

Suggested-by: Mark Constable <markc@renta.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoMerge branch 'ml/head-include'
Lars Hjemli [Sat, 25 Jul 2009 10:04:08 +0000 (12:04 +0200)]
Merge branch 'ml/head-include'

15 years agocgitrc.5.txt: document 'head-include'
Lars Hjemli [Sat, 25 Jul 2009 10:03:54 +0000 (12:03 +0200)]
cgitrc.5.txt: document 'head-include'

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years agoMerge branch 'plain-etag'
Lars Hjemli [Sat, 25 Jul 2009 09:59:22 +0000 (11:59 +0200)]
Merge branch 'plain-etag'

Conflicts:
ui-shared.c

15 years agoMerge branch 'rt/plain-binary'
Lars Hjemli [Sat, 25 Jul 2009 09:51:57 +0000 (11:51 +0200)]
Merge branch 'rt/plain-binary'

Signed-off-by: Lars Hjemli <hjemli@gmail.com>