Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Template:Git link

From FlightGear wiki
Jump to: navigation, search

[1]

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.
See also the discussion page.

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}}

[2]

{{Git link|gitorious|fg/flightgear|next|src/Main/options.cxx|1|100}}

[3]

{{Git link|github|andyross/nasal|master|README|1|9}}

[4]

{{Git link|github|andyross/nasal|master|README|1|9|pre=$NASAL_SRC}}

[5]

{{Git link|github|andyross/nasal|master|pre=$NASAL_SRC}}

[6]

{{Git link|gitorious|nasal-standalone/nasal-experiments|9b2d59c316d03b83cfb4352a38b865aa29f4c280|pre=$NASAL_SRC/}}

[7]

{{Git link|gitorious|fg/simgear|next|simgear/nasal/lib.c|text=Nasal library}}

Nasal library

Related templates