aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/admin/repo/list.tmpl3
-rw-r--r--templates/explore/repo_list.tmpl3
-rw-r--r--templates/repo/commits_list.tmpl2
-rw-r--r--templates/repo/create.tmpl13
-rw-r--r--templates/repo/header.tmpl3
-rw-r--r--templates/swagger/v1_json.tmpl18
6 files changed, 41 insertions, 1 deletions
diff --git a/templates/admin/repo/list.tmpl b/templates/admin/repo/list.tmpl
index 7102f73305..fdba0734a2 100644
--- a/templates/admin/repo/list.tmpl
+++ b/templates/admin/repo/list.tmpl
@@ -67,6 +67,9 @@
{{if .IsTemplate}}
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.template"}}</span>
{{end}}
+ {{if eq .ObjectFormatName "sha256"}}
+ <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.sha256"}}</span>
+ {{end}}
{{if .IsMirror}}
{{svg "octicon-mirror"}}
{{else if .IsFork}}
diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl
index b28aa02c1e..c51dcaa3ff 100644
--- a/templates/explore/repo_list.tmpl
+++ b/templates/explore/repo_list.tmpl
@@ -25,6 +25,9 @@
{{if .IsTemplate}}
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.template"}}</span>
{{end}}
+ {{if eq .ObjectFormatName "sha256"}}
+ <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.sha256"}}</span>
+ {{end}}
</span>
</div>
<div class="flex-item-trailing">
diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl
index 7bfed53124..7702770c40 100644
--- a/templates/repo/commits_list.tmpl
+++ b/templates/repo/commits_list.tmpl
@@ -3,7 +3,7 @@
<thead>
<tr>
<th class="three wide">{{ctx.Locale.Tr "repo.commits.author"}}</th>
- <th class="two wide sha">SHA1</th>
+ <th class="two wide sha">{{StringUtils.ToUpper $.Repository.ObjectFormatName}}</th>
<th class="eight wide message">{{ctx.Locale.Tr "repo.commits.message"}}</th>
<th class="two wide right aligned">{{ctx.Locale.Tr "repo.commits.date"}}</th>
<th class="one wide"></th>
diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl
index 3b4b994be7..66f73fb398 100644
--- a/templates/repo/create.tmpl
+++ b/templates/repo/create.tmpl
@@ -186,6 +186,19 @@
<span class="help">{{ctx.Locale.Tr "repo.default_branch_helper"}}</span>
</div>
<div class="inline field">
+ <label>{{ctx.Locale.Tr "repo.object_format"}}</label>
+ <div class="ui selection owner dropdown">
+ <input type="hidden" id="object_format_name" name="object_format_name" value="{{.DefaultObjectFormat.Name}}" required>
+ <div class="default text">{{.DefaultObjectFormat.Name}}</div>
+ <div class="menu">
+ {{range .SupportedObjectFormats}}
+ <div class="item" data-value="{{.Name}}">{{.Name}}</div>
+ {{end}}
+ </div>
+ </div>
+ <span class="help">{{ctx.Locale.Tr "repo.object_format_helper"}}</span>
+ </div>
+ <div class="inline field">
<label>{{ctx.Locale.Tr "repo.template"}}</label>
<div class="ui checkbox">
<input name="template" type="checkbox">
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index a5ef8daa9a..dac30af600 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -27,6 +27,9 @@
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.template"}}</span>
<div class="repo-icon" data-tooltip-content="{{ctx.Locale.Tr "repo.desc.template"}}">{{svg "octicon-repo-template" 18}}</div>
{{end}}
+ {{if eq .ObjectFormatName "sha256"}}
+ <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.sha256"}}</span>
+ {{end}}
</div>
</div>
{{if not (or .IsBeingCreated .IsBroken)}}
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 094a0e9aec..dc04a97b83 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -18370,6 +18370,15 @@
"uniqueItems": true,
"x-go-name": "Name"
},
+ "object_format_name": {
+ "description": "ObjectFormatName of the underlying git repository",
+ "type": "string",
+ "enum": [
+ "sha1",
+ "sha256"
+ ],
+ "x-go-name": "ObjectFormatName"
+ },
"private": {
"description": "Whether the repository is private",
"type": "boolean",
@@ -22185,6 +22194,15 @@
"type": "string",
"x-go-name": "Name"
},
+ "object_format_name": {
+ "description": "ObjectFormatName of the underlying git repository",
+ "type": "string",
+ "enum": [
+ "sha1",
+ "sha256"
+ ],
+ "x-go-name": "ObjectFormatName"
+ },
"open_issues_count": {
"type": "integer",
"format": "int64",