Template:Git file/doc

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

'' Bug It needs to convert '/' in the project and file parameters into %2F in gitblit URLs, e.g. https://git.wikimedia.org/blob/mediawiki%2Fextensions%2Fexamples.git/HEAD/BoilerPlate%2FREADME, but MW turns these into '/' in the HTML it generates.

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)
 * Not working yet, workaround is add action=summary
 * Not working yet, workaround is add action=summary

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 Gitblit action, e.g. ,  ,  . Note Gitblit doesn't support gerrit/gitweb's action blob_plain


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

Issues

 * TODO: add branch= parameter
 * ? Merge with Git, or maybe Gerrit, MW file, etc. but simpler?