diff options
author | Rowan Bohde <rowan.bohde@gmail.com> | 2024-10-30 00:12:48 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-30 13:12:48 +0800 |
commit | 1cd3f698591edf4fba7880a150b05855cdf40d47 (patch) | |
tree | a2c851ac871a5b0f60172cb02072348c149612a2 | |
parent | feca8802b85dd75090c533ebdb92835d3d529f17 (diff) | |
download | gitea-1cd3f698591edf4fba7880a150b05855cdf40d47.tar.gz gitea-1cd3f698591edf4fba7880a150b05855cdf40d47.zip |
remove unused call to $.HeadRepo in view_title template (#32317)
This is only populated in
[`ParseCompareInfo`](https://github.com/search?q=repo%3Ago-gitea%2Fgitea%20%20.Data%5B%22HeadRepo%22%5D&type=code)
which is called in two handlers:
*
[`CompareAndPullRequestPost`](https://github.com/go-gitea/gitea/blob/9206fbb55fd28f21720072fce6a36cc22277934c/routers/web/repo/pull.go#L1246)
- a JSON post handler that doesn't render templates
*
[`CompareDiff`](https://github.com/go-gitea/gitea/blob/9206fbb55fd28f21720072fce6a36cc22277934c/routers/web/repo/compare.go#L706)
- which can render `diff/box.tmpl` and `diff/compare.tmpl`
-rw-r--r-- | templates/repo/issue/view_title.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/issue/view_title.tmpl b/templates/repo/issue/view_title.tmpl index 7fa77b3f1c..1591c2cadf 100644 --- a/templates/repo/issue/view_title.tmpl +++ b/templates/repo/issue/view_title.tmpl @@ -102,7 +102,7 @@ {{$sameBase := ne $.BaseName $.HeadUserName}} {{$differentBranch := ne . $.HeadBranch}} {{if or $sameBase $differentBranch}} - <div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-branch="{{.}}">{{$.BaseName}}{{if $.HeadRepo}}/{{$.HeadRepo}}{{end}}:{{.}}</div> + <div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-branch="{{.}}">{{$.BaseName}}:{{.}}</div> {{end}} {{end}} </div> |