A (static) git repository browser [mirror]
Go to file
Eric Sunshine bebc7fa3f0 repo: diff: add option to show "creation event" diff for root commit
At its inception, Git did not show a "creation event" diff for a
project's root commit since early projects, such as the Linux kernel,
were already well established, and a large root diff was considered
uninteresting noise.

On the other hand, new projects adopting Git typically have small root
commits, and such a "creation event" is likely to have meaning, rather
than being pure noise. Consequently, git-diff-tree gained a --root flag
in dc26bd89 (diff-tree: add "--root" flag to show a root commit as a big
creation event, 2005-05-19), though it was disabled by default.

Displaying the root "creation event" diff, however, became the default
behavior when configuration option 'log.showroot' was added to git-log
in 0f03ca94 (config option log.showroot to show the diff of root
commits; 2006-11-23). And, gitk (belatedly) followed suit when it
learned to respect 'log.showroot' in b2b76d10 (gitk: Teach gitk to
respect log.showroot; 2011-10-04).

By default, these tools now all show the root diff as a "creation
event", however, git-arr suppresses it unconditionally. Resolve this
shortcoming by adding a new git-arr configuration option "rootdiff" to
control the behavior (enabled by default).

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
2015-01-11 21:18:22 +00:00
hooks Add a post-receive hook 2013-03-12 22:09:25 +00:00
static Show the age of a repository in the index, via javascript 2013-11-02 22:18:33 +00:00
views views: summary: suppress extra horizontal rule when no "master" branch 2015-01-11 21:18:06 +00:00
.gitignore Initial commit 2012-11-10 17:49:54 +00:00
git-arr repo: diff: add option to show "creation event" diff for root commit 2015-01-11 21:18:22 +00:00
git.py repo: diff: add option to show "creation event" diff for root commit 2015-01-11 21:18:22 +00:00
LICENSE Initial commit 2012-11-10 17:49:54 +00:00
README Add a note about pygments in the README 2012-11-21 00:29:43 +00:00
sample.conf repo: diff: add option to show "creation event" diff for root commit 2015-01-11 21:18:22 +00:00
TODO Initial commit 2012-11-10 17:49:54 +00:00
utils.py Enable line number anchors when using pygments HtmlFormatter 2014-07-03 00:56:19 +01:00

git-arr - A git repository browser
----------------------------------

git-arr is a git repository browser that can generate static HTML instead of
having to run dynamically.

It is smaller, with less features and a different set of tradeoffs than
other similar software, so if you're looking for a robust and featureful git
browser, please look at gitweb or cgit instead.

However, if you want to generate static HTML at the expense of features, then
it's probably going to be useful.

It's open source under the MIT licence, please see the LICENSE file for more
information.


Getting started
---------------

You will need Python, and the bottle.py framework (the package is usually
called python-bottle in most distributions).

If pygments is available, it will be used for syntax highlighting, otherwise
everything will work fine, just in black and white.


First, create a configuration file for your repositories. You can start by
copying sample.conf, which has the list of the available options.

Then, to generate the output to "/var/www/git-arr/" directory, run:

  $ ./git-arr --config config.conf generate --output /var/www/git-arr/

That's it!

The first time you generate, depending on the size of your repositories, it
can take some time. Subsequent runs should take less time, as it is smart
enough to only generate what has changed.


You can also use git-arr dynamically, although it's not its intended mode of
use, by running:

  $ ./git-arr --config config.conf serve

That can be useful when making changes to the software itself.


Contact
-------

If you want to report bugs, send patches, or have any questions or comments,
just let me know at albertito@blitiri.com.ar.