「テンプレート:GitCommit/doc」の版間の差分

提供: wiki
移動先: 案内検索
(1版 をインポートしました)
 
1行目: 1行目:
 
Template to link to commits in GIT, useful for writing release notes.
 
Template to link to commits in GIT, useful for writing release notes.
  
Just use the <code>rXXX12345678</code> format as in phabricator:
+
Long SHAs are automatically shortened.
  
Commit  {{GitCommit|rBa9e0f3364fd9}} in blender:
+
Commit {{GitCommit|a9e0f3364fd93c51bd004d46b7b859d55b20a7b8}} in blender/blender:
 +
<nowiki>{{GitCommit|a9e0f3364fd93c51bd004d46b7b859d55b20a7b8}}</nowiki>
 +
 
 +
==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 {{GitCommit|a9e0f3364fd9|blender}} in blender/blender:
 +
<nowiki>{{GitCommit|a9e0f3364fd9|blender}}</nowiki>
 +
 
 +
Commit {{GitCommit|78b0fc30b6|blender-addons}} in blender/blender-addons:
 +
<nowiki>{{GitCommit|78b0fc30b6|blender-addons}}</nowiki>
 +
 
 +
Commit {{GitCommit|65ff08e325|blender-addons-contrib}} in blender/blender-addons-contrib:
 +
  <nowiki>{{GitCommit|65ff08e325|blender-addons-contrib}}</nowiki>
 +
 
 +
For organizations different than the default Blender one, or for forks, a third parameter can be provided:
 +
 
 +
Commit {{GitCommit|55bfc8db88|flamenco|studio}} in studio/flamenco:
 +
<nowiki>{{GitCommit|55bfc8db88|flamenco|studio}}</nowiki>
 +
 
 +
Commit {{GitCommit|4d3bfb3f41|blender|mont29}} in mont29/blender:
 +
<nowiki>{{GitCommit|4d3bfb3f41|blender|mont29}}</nowiki>
 +
 
 +
==Phabricator-like References==
 +
 
 +
The <code>rXXX12345678</code> format as it existed in Phabricator is still supported for git repositories:
 +
 
 +
Commit {{GitCommit|rBa9e0f3364fd9}} in blender/blender:
 
  <nowiki>{{GitCommit|rBa9e0f3364fd9}}</nowiki>
 
  <nowiki>{{GitCommit|rBa9e0f3364fd9}}</nowiki>
  
Commit {{GitCommit|rBA8078c1a024dc}} in addons:
+
Commit {{GitCommit|rBA8078c1a024dc}} in blender/blender-addons:
 
  <nowiki>{{GitCommit|rBA8078c1a024dc}}</nowiki>
 
  <nowiki>{{GitCommit|rBA8078c1a024dc}}</nowiki>
  
This also works for svn commits:
+
Commit {{GitCommit|rBAC65ff08e325}} in blender/blender-addons-contrib:
 +
<nowiki>{{GitCommit|rBAC65ff08e325}}</nowiki>
 +
 
 +
It will remap to the proper organization when needed:
 +
 
 +
Commit {{GitCommit|rF55bfc8db88}} in studio/flamenco:
 +
<nowiki>{{GitCommit|rF55bfc8db88}}</nowiki>
 +
 
 +
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  {{GitCommit|rBM244}} in blender manual:
 
Commit  {{GitCommit|rBM244}} in blender manual:
 
  <nowiki>{{GitCommit|rBM244}}</nowiki>
 
  <nowiki>{{GitCommit|rBM244}}</nowiki>
  
Note you should usually allways only use the twelve first digits of the GIT commit’s SHA, but you can also use the full signature of a commit:
+
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 {{GitCommit|a9e0f3364fd9}} in blender/blender:
 +
<nowiki>{{GitCommit|a9e0f3364fd9}}</nowiki>
 +
 
 +
==Other References==
  
Commit  {{GitCommit|rBa9e0f3364fd93c51bd004d46b7b859d55b20a7b8}} in blender:
+
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.
<nowiki>{{GitCommit|rBa9e0f3364fd93c51bd004d46b7b859d55b20a7b8}}</nowiki>
 

2023年2月14日 (火) 04:15時点における最新版

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.