Template:Git file/doc

This generates a link to a file on http://git.wikimedia.org, our gitblit server.

It used to generate links to gerrit.

Usage
produces
 * basic

produces
 * action

produces
 * link to line number, default project

produces
 * a project (no filename, so use text)

Parameters

 * project
 * defaults to mediawiki/core. Must be entire path to project &mdash; usually mediawiki/, often followed by extensions/, then your project &mdash; but not the .git suffix.


 * file
 * optional. A file or directory within the project, without the leading '/ ' . If you just want to link to the project, use gitweb. Note to avoid confusion you may want to invoke this template with underscore &mdash;.


 * text
 * optional. The text that's linked. If not specified, defaults to file.


 * action
 * optional. You can give a gerrit action, e.g. ,   (gerrit/gitweb infers this if file= a directory)... TODO: what are the other values?


 * line
 * optional.  will add a fragment to the URL that positions the browser at line 42 of the file.

Issues

 * action= is gerrit-specific, maybe abstract away from gerrit to format=raw/mimetype/...
 * TODO: add branch= parameter
 * ? Merge with Git, or maybe Gerrit, MW file, etc. but simpler?