Template:Gitorious source
Note The Gitorious open source infrastructure is locked in a read-only archived state. |
Goal
This template is for creating links or URLs for the content of the version control repositories in the Gitorious archive. It is a subtemplate of the master {{repo link}} template designed to be specific for the Gitorious repositories.
Usage
{{gitorious source | cmd = | type = | proj = | repo = | branch = | path = | commit = | line = | view = | text = | pre = | post = | simplepath = | full = }}
All parameters are optional.
- cmd
- An optional command line tool name + options to prepend to the URL. For example git clone.
- type
- Choose between the web interface or direct repository link. This can be either git or git web. The default is git web.
- proj
- The name of the project, consisting of a grouping of repositories on the open source infrastructure. This defaults to fg.
- repo
- The name of the repository, for example fgdata. A project registered on one of the open source infrastructures generally allows for multiple repositories under that project name. This defaults to flightgear.
- branch
- The git branch or tag name. For git tags, simply append
/~
to the tag name. This defaults to next.
- path
- The file path.
- commit
- The commit identifier (git hash). This defaults to next.
- line
- Line number of the file to display.
- view
- View to display, one of summary, shortlog, log, blob, commit, commitdiff, tree, history, or raw. The default is blob if a path is given, commit if a commit is given, or summary otherwise.
- text
- Text to display as the link label. Overrides pre.
- pre
- Prefix to a link label.
- post
- Text to append.
- simplepath
- If set, this strips off the repository name from the URL label, leaving just the contents of the path parameter.
- Note The text parameter will override this.
- full
- If set, the full URL will be shown.
Examples
The old FlightGear source repository
This is for the archived flightgear repository at https://gitorious.org/fg/flightgear.git. The automatically created URL, which is equivalent, should be https://gitorious.org/fg/flightgear?p=fg:flightgear.git;a=summary.
{{gitorious source | text = The archived flightgear source code repository at Gitorious }}
The archived flightgear source code repository at Gitorious.
The historic fgdata repository
This is for the historic repository https://gitorious.org/fg/fgdata.git. The automatically created URL, which is equivalent, should be https://gitorious.org/fg/fgdata?p=fg:fgdata.git;a=summary.
{{gitorious source | repo = fgdata | text = The archived fgdata repository at Gitorious, with full history from 2000-2015 }}
The archived fgdata repository at Gitorious, with full history from 2000-2015.
Git clone
This is for cloning the historic fgdata repository with git clone https://gitorious.org/fg/fgdata.git
.
{{#tag:code | {{#tag:nowiki | {{gitorious source | cmd = git clone | repo = fgdata | type = git | full = 1 }} }} }}
git clone https://gitorious.org/fg/fgdata.git
File with line number
{{gitorious source | repo = hoorays-fgdata | view = blob | branch = topics/scriptable-ai-submodule | path = Nasal/ai/ai.nas | lines = 1 | text = Scripted AI Objects repo }}
File prefixed with $NASAL_SRC
{{gitorious source | repo = hoorays-fgdata | view = blob | branch = topics/scriptable-ai-submodule | path = Nasal/ai/ai.nas | pre = $NASAL_SRC | simplepath = 1 }}
Raw view
{{repo link | site = gito | proj = fg | repo = hoorays-fgdata | view = raw | branch = topics/scriptable-ai-submodule | path = Nasal/ai/ai.nas | full = 1 }}
Commit
{{gitorious source | proj = nasal-standalone | repo = nasal-experiments | view = commit | commit = 9b2d59c316d03b83cfb4352a38b865aa29f4c280 | pre = $NASAL_SRC }}
Commitdiff
{{gitorious source | proj = nasal-standalone | repo = nasal-experiments | view = commitdiff | commit = 9b2d59c316d03b83cfb4352a38b865aa29f4c280 | pre = $NASAL_SRC }}
Main views
Summary view
This is for https://gitorious.org/fg/fgdata?p=fg:fgdata.git;a=summary.
{{gitorious source | repo = fgdata | view = summary | full = 1 }}
https://gitorious.org/fg/fgdata?p=fg:fgdata.git;a=summary
Shortlog view
This is for https://gitorious.org/fg/fgdata?p=fg:fgdata.git;a=shortlog.
{{gitorious source | repo = fgdata | view = shortlog | full = 1 }}
https://gitorious.org/fg/fgdata?p=fg:fgdata.git;a=shortlog
Log view
This is for https://gitorious.org/fg/fgdata?p=fg:fgdata.git;a=log;h=4c03a4968d2844c9c8ba734116da3478a1bebb38.
{{gitorious source | repo = fgdata | view = log | commit = 4c03a4968d2844c9c8ba734116da3478a1bebb38 | full = 1 }}
https://gitorious.org/fg/fgdata?p=fg:fgdata.git;a=log;h=4c03a4968d2844c9c8ba734116da3478a1bebb38
Related templates
|