Add is_clone flag to available commands

This will be used to make these operations configurable via a config
option.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Allow disabling of HTTP clone URLs

If advertising other URLs to your users, you may not want to make this
available through cgit (e.g. if you have the smart HTTP transport set up
elsewhere). Allow disabling the three magic commands that simulate the
git server, but default it to enabled.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Return 404 on command not found

We were returning 200 before. Even 404 is questionable in all cases, but
200 was totally wrong. Also match the case of all of the "Not found"
status messsages.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
html.c: add html_intoption()

This is similar to html_option, but for int values.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
ui-diff.c: create a control panel for diff options

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
ui-stats.c: create a control panel for stat options

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
new_filter: determine extra_args from filter type

Currently the number of extra arguments is linked hard to the type of
the filter. This is also logical since it would be confusing to have
a different number of arguments for the same type of filter depending
on the context under which the filter is run (unless ofcourse one the
parameters would make the context clear, which is currently not the
case).

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
cgit_open_filter: also take the repo as a parameter

To prepare for handing repo configuration to the
filter script that is executed.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
cgit_open_filter: hand down repo configuration to script

The environment variables can be used to (for example) resolve
the following situation:

Suppose a server setup in which each repository has a trac
instance; the commit filter needs to know with which
repository it's dealing in order to be able to resolve the
#123 ticket numbers in the commit messages into hyperlinks
into the correct trac instance.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
filters: document environment variables in filter scripts

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
shared.c: use execvp() to execute filter commands

This reintroduces the use of execvp(), since the filter commands doesn't
always contain an absolute path (i.e. snapshot compression filters).

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
make enable-log-linecount independent of -filecount

You should be able to independently switch file and line count on and
off. This patch makes the code work like the documentation suggests: no
dependency for line counts to be displayed only when file counts are.

Signed-off-by: Julius Plenz <plenz@cis.fu-berlin.de>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Merge branch 'stable'
Merge branch 'dm/disable-clone'
Merge branch 'stable'
Merge branch 'fh/filter-api'

Conflicts:
	cgit.c
Merge branch 'lh/panel'
ui_repolist: get modtime from packed-refs as fallback

When no modtime could be determined then as a final
fallback try to get it from the packed-refs.

This will show an idle time when a repository has been packed
with all refs in the packed-refs.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Merge branch 'stable'
ui-stats.c: fix invalid html

Found by http://validator.w3.org.

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