Template:Git link
Jump to navigation
Jump to search
The following template description is not displayed when the template is inserted in an article.
This template is outdated and non-functional but is kept for historical reference.
This template is kept for the last few pages that link to it. It is not functional and the links it produces are broken. Please use the {{repo link}} family of templates instead. |
Goal
This template allows easy links to Git-managed files or projects from outside sources (e.g. Gitorious.org and GitHub.com).
Note Using this will add an external link; make sure to enter the appropriate security question after hitting "Save page", or your changes will be lost.
Usage
{{Git link | site | projectname/reponame | revision | path of file | line or start of line range | end of line range | pre= | text= }}
- site
- Optional Git site. Either of gitorious or github. Defaults to gitorious.
- projectname/reponame
- Optional. Defaults to fg/fgdata.
- revision
- Optional. Defaults to master.
- path of file
- Mandatory if line or start of line range is provided, otherwise optional.
- line or start of line range
- Optional line to go to on the page with the source.
- end of line range
- Optionally used in conjunction with line or start of line range.
- pre
- Optional prefix for the links label. Defaults to fg/fgdata.
- text
- Optional alternative label for the link text. Will override any other parameters.
Examples
{{Git link|gitorious|fg/flightgear|next|src/Main/options.cxx}}
{{Git link|gitorious|fg/flightgear|next|src/Main/options.cxx|1|100}}
{{Git link|github|andyross/nasal|master|README|1|9}}
{{Git link|github|andyross/nasal|master|README|1|9|pre=$NASAL_SRC}}
{{Git link|github|andyross/nasal|master|pre=$NASAL_SRC}}
{{Git link|gitorious|nasal-standalone/nasal-experiments|9b2d59c316d03b83cfb4352a38b865aa29f4c280|pre=$NASAL_SRC/}}
{{Git link|gitorious|fg/simgear|next|simgear/nasal/lib.c|text=Nasal library}}
Related templates
|