gitea/templates/repo/commits_ref_name.tmpl
Lunny Xiao 8373f7deb3
improve the compare page (#36261)
- The compare page head title should be `compare` but not `new pull
request`.
- Use `UnstableGuessRefByShortName` instead of duplicated functions
calls.
- Direct-compare, tags, commits compare will not display `New Pull
Request` button any more.

The new screenshot
<img width="1459" height="391" alt="image"
src="https://github.com/user-attachments/assets/64e9b070-9c0b-41d1-b4b8-233b96270e1b"
/>

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-01-01 10:32:19 -08:00

10 lines
284 B
Handlebars

{{- /* Template Argument: git.RefName */ -}}
{{- $refName := . -}}
{{- if $refName.IsBranch -}}
{{svg "octicon-git-branch"}} {{$refName.ShortName}}
{{- else if $refName.IsTag -}}
{{svg "octicon-tag"}} {{$refName.ShortName}}
{{- else -}}
{{ShortSha $refName.ShortName}}
{{- end -}}