Template:Fgdata-old commit

From FlightGear wiki
Jump to navigation Jump to search

Missing parameter commit

The following template description is not displayed when the template is inserted in an article.


This template can be used when linking to summaries of commits for the fgdata-old git repository at Gitorious. It is a subtemplate of the master {{repo link}} template designed to link to specific version control commits.


{{fgdata-old commit
| commit     =
| text       =

The parameters are:

Parameter Description Abbreviated
commit The commit identifier (git hash). This defaults to HEAD. c 1 mandatory
text Text to display as the link label. t 2 optional


In this section, the following notation will be used:

Angular brackets + lower case text <xyz>
Template parameters.
Angular brackets + upper case text <XYZ>
Template constructed text.
Square brackets [xyz]
Optional text, only added if the parameter is set.
Or symbol |
The value on the left, if present, otherwise the value on the right of the symbol.


The general design is:

<cmd> <opt> [<URL> <TEXT>] <post>

Here the square brackets do not denote optional text, but will instead produce a Mediawiki link. This can be modified by setting full = 1 to produce:

<cmd> <opt> <URL> <post>

Site: Gitorious

The Gitorious URLs are predominantly query rather than path based. And only the https:// protocol is supported. The base URL constructed by this template is:


Gitorious <URL> for 'type=git'

For this parameter value, the complete <URL> value will be:


Gitorious <URL> for 'type=git web'

As the current archival system is based on queries — the text after the ? character — absolutely any random path after the gitorious.org/ domain name can be used. But, for aesthetics, the project and repository name will be appended by this template. The <URL> will be:


The <QUERY> string consists of parts for the project and repository (p=), the type of view (a=), the path (f=), and the commit, branch or tag (h= or hb=, depending on the view). The <URL> fragment for the project and repository is constructed as:


The <URL> fragment for the view is constructed as:


Where <VIEW> is the value of the view parameter, if supplied, with the value of raw translated to blob_plain. If not supplied, the value of blob is used if path is given, commit if commit is given, or summary otherwise. The <URL> fragment for the path is constructed as:


If the view parameter is set to one of blob, raw, or tree, the <URL> fragment for the commit, branch or tag is constructed as:


Otherwise it will be:


In summary, the full web URL will be:


Gitorious URL <TEXT>

The link text <TEXT>, if the full parameter is not set, will be:


If the simplepath parameter is set, this changes to:


If the pre parameter is supplied, this changes to:


The text parameter trumps all, and <TEXT> is simply:


Plain text

To create a URL or link as plain text and avoid external links, simply use the {{#tag:tagname|content}} magic word construct:

  {{repo link
  | full = 1


To use the <code> tags:

  {{repo link
  | full = 1



Auto-generated text

{{fgdata-old commit | c1d4d0}}

fgdata-old commit c1d4d0

User supplied text

The C172P now has {{fgdata-old commit | ba60f8 | text = variant support}}.

The C172P now has variant support .

Parameter alias

The C172P now has {{fgdata-old commit | ba60f8 | t = variant support}}.

The C172P now has variant support .

Numbered parameters

The C172P now has {{fgdata-old commit | ba60f8 | variant support}}.

The C172P now has variant support .

Related templates