Difference between revisions 563810 and 576145 on mediawikiwiki

<noinclude>{{Documentation subpage}}
{{timw|{{BASEPAGENAME}}}}
</noinclude>
<!-- PUT HERE THE DOCUMENTATION -->
This generates a link to a file on [[Gerrit]].

The goal is to avoid ugly URLs like
  https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/examples.git;f=BoilerPlate/README;hb=HEAD
and also future-proof (ha ha) these links against changes and evolution to source code control.

== Usage ==
 <nowiki>{{git_file</nowiki> |project=mediawiki/extensions/''examples'' |file=''BoilerPlate/README'' }}
produces
:{{git_file  |project=mediawiki/extensions/examples  |file=BoilerPlate/README }}

 <nowiki>{{git_file</nowiki> |project=mediawiki/extensions/ArticleFeedback 
 |file=modules/jquery.articleFeedback/images/star-new-down.png
 |text=star image | action=blob_plain }}
produces
{{git_file  |project=mediawiki/extensions/ArticleFeedback 
 |file=modules/jquery.articleFeedback/images/star-new-down.png
 |text=star image |action=blob_plain}}

=== Parameters ===
; project
: mandatory. Must be entire path to project &mdash; always (?) mediawiki/ , usually extensions, then your project &mdash; but not the <tt>.git</tt>
; file
(contracted; show full)* '''TODO''': Merge with {{tl|Git}}, or maybe {{tl|Gerrit}}, {{tl|MW file}}, etc. but simpler. 
== See also ==
* {{tl|MW file}} generates complicated link to file, used by [[Manual]]
* lots of other fancy templates for extensions on gerrit, see [[:Category:Git]]
<includeonly>
<!-- PUT HERE THE CATEGORIES OF THE TEMPLATE -->
[[Category:Git]]
</includeonly>