跳转到内容

模板:Git file/tr

来自天灾之下:危险连接资料站

{{{file}}}

模板文档

Kullanım

Generates a link to view the file in Gerrit.

模板参数[编辑模板数据]

此模板首选参数不换行的行内格式。

参数描述类型状态
Labeltext

The text that become the link.

默认值
The “file” parameter value.
字符串可选
Modeaction

One of “browse”, “tree” or “blame” or “history”.

默认值
browse
字符串可选
Repositoryproject

Which Git repository the file is in.

默认值
mediawiki/core
字符串可选
Branchbranch

Which branch of the repository the file is in.

默认值
HEAD
字符串可选
Commitsha

The SHA-1 hash of the specific commit within a branch. Use this to make a permalink.

字符串可选
Filefile

Path to the file within the specified repository and branch.

示例值
includes/MediaWiki.php
字符串必需
Line numberline

The link will anchor to this line within the file, and highlight it.

示例值
42
数字可选


Örnek

Temel

{{Git file|file=composer.json}} şunu üretir:

composer.json

{{Git file|project=mediawiki/extensions/Flow|file=FlowActions.php}} şunu üretir:

FlowActions.php
Metin

{{Git file|project=mediawiki/extensions/EventLogging|file=devserver/bin/eventlogging-devserver|text=geliştirme sunucusu}} şunu üretir:

geliştirme sunucusu
Eylem

{{Git file|file=composer.json|action=raw}} {{Git file|file=composer.json|action=blame}} {{Git file|file=composer.json|action=history}} şunu üretir:

composer.json
composer.json
composer.json

{{Git file|project=mediawiki/extensions/EventLogging|text=EventLogging extension}} şunu üretir:

EventLogging extension
Satır numarası

{{Git file|file=tests/phpunit/includes/MessageTest.php|line=123}} şunu üretir:

tests/phpunit/includes/MessageTest.php
Proje özet sayfası (kullanımdan kaldırıldı)

{{Git file|project=oojs/core|action=summary|text=OOjs (çekirdek)}} şunu üretir:

OOjs (çekirdek)

Bilinen sorunlar

Notlar

Şablon, noktalı virgül ve hashmark için ; ve &32; sayısal varlıkları kullanmak zorundadır çünkü, WP:Gelişmiş şablon kodlaması, "MediaWiki, #if içindeki cümleleri wiki olarak biçimlendirir" içindeki cümlecikleri viki olarak biçimlendirdiğini belirtir. MediaWiki bazen bu karakterleri bir tanım terimi ve numaralandırılmış liste olarak ayrıştırır (yeni satırların başında olmasalar bile).

Ayrıca bakınız

  • {{Git repo }} depo özeti bağlar
  • {{Gitblit }} depo özetine bağlantı oluşturur
  • {{MW file }} Kılavuz tarafından kullanılan karmaşık bir dosya bağlantısı oluşturur.
  • gerrit üzerindeki uzantılar için diğer pek çok süslü şablon, Category:Git kategorisine bakın.
  • {{Github }}