模板:Git file/tr
Kullanım
Generates a link to view the file in Gerrit.
| 参数 | 描述 | 类型 | 状态 | |
|---|---|---|---|---|
| Label | text | The text that become the link.
| 字符串 | 可选 |
| Mode | action | One of “browse”, “tree” or “blame” or “history”.
| 字符串 | 可选 |
| Repository | project | Which Git repository the file is in.
| 字符串 | 可选 |
| Branch | branch | Which branch of the repository the file is in.
| 字符串 | 可选 |
| Commit | sha | The SHA-1 hash of the specific commit within a branch. Use this to make a permalink. | 字符串 | 可选 |
| File | file | Path to the file within the specified repository and branch.
| 字符串 | 必需 |
| Line number | line | The link will anchor to this line within the file, and highlight it.
| 数字 | 可选 |
Örnek
- Temel
{{Git file|file=composer.json}} şunu üretir:
{{Git file|project=mediawiki/extensions/Flow|file=FlowActions.php}} şunu üretir:
- Metin
{{Git file|project=mediawiki/extensions/EventLogging|file=devserver/bin/eventlogging-devserver|text=geliştirme sunucusu}} şunu üretir:
- Eylem
{{Git file|file=composer.json|action=raw}} {{Git file|file=composer.json|action=blame}} {{Git file|file=composer.json|action=history}} şunu üretir:
{{Git file|project=mediawiki/extensions/EventLogging|text=EventLogging extension}} şunu üretir:
- Satır numarası
{{Git file|file=tests/phpunit/includes/MessageTest.php|line=123}} şunu üretir:
- Proje özet sayfası (kullanımdan kaldırıldı)
{{Git file|project=oojs/core|action=summary|text=OOjs (çekirdek)}} şunu üretir:
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).