aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/home.tmpl
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2023-09-16 05:51:54 +0200
committerGitHub <noreply@github.com>2023-09-16 03:51:54 +0000
commitf3f445862e0962b673b5e0d3d12b00c3f7001d85 (patch)
tree9e9b0d87b8acb411e31704fe6dad909ce8f86956 /templates/repo/home.tmpl
parent7cdbe65a2c3ea5a4d958d40428713f6699a22337 (diff)
downloadgitea-f3f445862e0962b673b5e0d3d12b00c3f7001d85.tar.gz
gitea-f3f445862e0962b673b5e0d3d12b00c3f7001d85.zip
Use `print` instead of `printf` (#27093)
A bit more performant when we only use it for appending strings.
Diffstat (limited to 'templates/repo/home.tmpl')
-rw-r--r--templates/repo/home.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl
index 11dc47f555..616cb7a938 100644
--- a/templates/repo/home.tmpl
+++ b/templates/repo/home.tmpl
@@ -70,7 +70,7 @@
{{if ne .Repository.ID .BaseRepo.ID}}
{{$cmpBranch = printf "%s/%s:" (.Repository.OwnerName|PathEscape) (.Repository.Name|PathEscape)}}
{{end}}
- {{$cmpBranch = printf "%s%s" $cmpBranch (.BranchName|PathEscapeSegments)}}
+ {{$cmpBranch = print $cmpBranch (.BranchName|PathEscapeSegments)}}
{{$compareLink := printf "%s/compare/%s...%s" .BaseRepo.Link (.BaseRepo.DefaultBranch|PathEscapeSegments) $cmpBranch}}
<a id="new-pull-request" role="button" class="ui compact basic button" href="{{$compareLink}}"
data-tooltip-content="{{if .PullRequestCtx.Allowed}}{{.locale.Tr "repo.pulls.compare_changes"}}{{else}}{{.locale.Tr "action.compare_branch"}}{{end}}">