テンプレート:GitCommit

提供: wiki
2018年6月29日 (金) 06:05時点におけるYamyam (トーク | 投稿記録)による版 (1版 をインポートしました)
移動先: 案内検索

Template to link to commits in GIT, useful for writing release notes.

Long SHAs are automatically shortened.

Commit a9e0f3364fd93c5 in blender/blender:

{{GitCommit|a9e0f3364fd93c51bd004d46b7b859d55b20a7b8}}

Explicit Fork & Repo References

An explicit repository name and commit hash is the recommended way to create links to commits, as it is reasonably un-ambiguous:

Commit a9e0f3364fd9 in blender/blender:

{{GitCommit|a9e0f3364fd9|blender}}

Commit 78b0fc30b6 in blender/blender-addons:

{{GitCommit|78b0fc30b6|blender-addons}}

Commit 65ff08e325 in blender/blender-addons-contrib:

{{GitCommit|65ff08e325|blender-addons-contrib}}

For organizations different than the default Blender one, or for forks, a third parameter can be provided:

Commit 55bfc8db88 in studio/flamenco:

{{GitCommit|55bfc8db88|flamenco|studio}}

Commit 4d3bfb3f41 in mont29/blender:

{{GitCommit|4d3bfb3f41|blender|mont29}}

Phabricator-like References

The rXXX12345678 format as it existed in Phabricator is still supported for git repositories:

Commit rBa9e0f3364fd9 in blender/blender:

{{GitCommit|rBa9e0f3364fd9}}

Commit rBA8078c1a024dc in blender/blender-addons:

{{GitCommit|rBA8078c1a024dc}}

Commit rBAC65ff08e325 in blender/blender-addons-contrib:

{{GitCommit|rBAC65ff08e325}}

It will remap to the proper organization when needed:

Commit rF55bfc8db88 in studio/flamenco:

{{GitCommit|rF55bfc8db88}}

This used to works for svn commits, however with Gitea, svn repositories are not exposed that way anymore, so an invalid link is generated:

Commit rBM244 in blender manual:

{{GitCommit|rBM244}}

See Template:GitCommit/PhabricatorParse for more details.

Commit Hash Only

With only a commit hash parameter, this template creates a link to the main official Blender repository:

Commit a9e0f3364fd9 in blender/blender:

{{GitCommit|a9e0f3364fd9}}

Other References

Some other types of references are only supported for historical reasons and should never be used in new wiki text, see Template:GitCommit/PhabricatorParseDeprecated for details.