A (static) git repository browser [mirror]
e930f9e4f7
Branch names in Git may be hierarchical (for example, "wip/parser/fix"), however, git-arr does not take this into account in its Bottle routing rules. Unfortunately, when updated to recognize hierarchical branch names, the rules become ambiguous in their present order since Bottle matches them in the order registered. The ambiguity results in incorrect matches. For instance, branch pages (/r/<repo>/b/<bname>/) are matched before tree pages (/r/<repo>/b/<bname>/t/), however, when branch names can be hierarchical, a tree path such as "/r/proj/b/branch/t/" also looks like a branch named "branch/t", and thus undesirably matches the branch rule rather than the tree rule. This problem can be resolved by adjusting the order of rules. Therefore, re-order the rules from most to least specific as a preparatory step prior to actually fixing them to accept hierarchical branch names. This is a purely textual relocation. No functional changes intended. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar> |
||
---|---|---|
hooks | ||
static | ||
views | ||
.gitignore | ||
git-arr | ||
git.py | ||
LICENSE | ||
README | ||
sample.conf | ||
TODO | ||
utils.py |
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.