Commit Graph

11 Commits

Author SHA1 Message Date
Alberto Bertogli
6f5f3c4aa5 Add a post-receive hook
This patch adds a post-receive hook that can be used to trigger a git-arr
update when there is a push to a repository.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
0.11
2013-03-12 22:09:25 +00:00
Alberto Bertogli
c72278c97c Allow calling the executable from any directory
When the tool is invoked like /path/to/git-arr, it currently fails because
both the serving of static files and bottle templates assume they're on the
current working directory.

This patch fixes that by computing the directories based on the executable
location.

Note this is assuming the static directory and the templates live next to the
executable, which will not always be the case, and eventually it should be
configurable; but it's ok for the time being.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
2013-03-10 00:55:56 +00:00
Alberto Bertogli
18e8599bfa Use "cloneurl" as a default for git_url
This patch makes git_url have the same default as gitweb.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
2013-03-09 23:23:52 +00:00
Alberto Bertogli
c303c30755 Fix the "--only" option
This patch fixes the --only option, and makes it avoid generating the
top-level index so we don't get a broken one with only the specified
repositories.

The intention is that this option is used in hooks to update the views after a
commit or push.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
2013-03-09 23:23:52 +00:00
Alberto Bertogli
9ec2bde5c4 Only guess the lexer if the file starts with "#!"
The lexer guesser based on content is often wrong; to minimize the chances of
that happening, we only use it on files that start with "#!", for which it
usually has smarter rules.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
2012-11-27 02:57:31 +00:00
Alberto Bertogli
36db9cc0ee Add a note about pygments in the README
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
0.10
2012-11-21 00:29:43 +00:00
Alberto Bertogli
bad8c52ef2 Fall back to guess the lexer by content
If we can't guess the lexer by the file name, try to guess based on the
content.

This allows pygments to colorize extension-less files, usually scripts.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
2012-11-18 14:55:27 +00:00
Alberto Bertogli
62da3ebc08 Use heuristics to decide what to colorize
In practise pygments seems to have a very hard time processing large files and
files with long lines, so try to avoid using it in those cases.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
2012-11-18 14:55:22 +00:00
Alberto Bertogli
ba3b2132f5 Improve the way we find repo paths
This patch improves the way we find the path to the repositories, both in the
recursive and in the non-recursive cases.

We now support specifying non-bare repositories directly, and also recursing
on them.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
2012-11-11 13:43:02 +00:00
Alberto Bertogli
1c729578b2 Add dependencies and improve contact information to README
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
2012-11-11 12:53:39 +00:00
Alberto Bertogli
80ef0017d4 Initial commit
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
0.01
2012-11-10 17:49:54 +00:00