aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/code
diff options
context:
space:
mode:
authorChai-Shi <changchaishi@gmail.com>2025-01-10 13:29:55 +0800
committerGitHub <noreply@github.com>2025-01-10 05:29:55 +0000
commite5f3c16587483daa18fa1db8bbc111452d9b864a (patch)
tree7ce5c7e95ce5c436ed036315fb82dccd02cc7149 /templates/repo/code
parent189e7409b7340fcd27a86df1925c9270768065c1 (diff)
downloadgitea-e5f3c16587483daa18fa1db8bbc111452d9b864a.tar.gz
gitea-e5f3c16587483daa18fa1db8bbc111452d9b864a.zip
Fix sync fork for consistency (#33147)
Fixes #33145 An integration test could be added. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'templates/repo/code')
-rw-r--r--templates/repo/code/upstream_diverging_info.tmpl6
1 files changed, 3 insertions, 3 deletions
diff --git a/templates/repo/code/upstream_diverging_info.tmpl b/templates/repo/code/upstream_diverging_info.tmpl
index 51402598f9..bdcd99a7f7 100644
--- a/templates/repo/code/upstream_diverging_info.tmpl
+++ b/templates/repo/code/upstream_diverging_info.tmpl
@@ -1,8 +1,8 @@
-{{if and .UpstreamDivergingInfo (or .UpstreamDivergingInfo.BaseIsNewer .UpstreamDivergingInfo.CommitsBehind)}}
+{{if and .UpstreamDivergingInfo (or .UpstreamDivergingInfo.BaseHasNewCommits .UpstreamDivergingInfo.CommitsBehind)}}
<div class="ui message flex-text-block">
<div class="tw-flex-1">
- {{$upstreamLink := printf "%s/src/branch/%s" .Repository.BaseRepo.Link (.BranchName|PathEscapeSegments)}}
- {{$upstreamHtml := HTMLFormat `<a href="%s">%s:%s</a>` $upstreamLink .Repository.BaseRepo.FullName .BranchName}}
+ {{$upstreamLink := printf "%s/src/branch/%s" .Repository.BaseRepo.Link (.Repository.BaseRepo.DefaultBranch|PathEscapeSegments)}}
+ {{$upstreamHtml := HTMLFormat `<a href="%s">%s:%s</a>` $upstreamLink .Repository.BaseRepo.FullName .Repository.BaseRepo.DefaultBranch}}
{{if .UpstreamDivergingInfo.CommitsBehind}}
{{ctx.Locale.TrN .UpstreamDivergingInfo.CommitsBehind "repo.pulls.upstream_diverging_prompt_behind_1" "repo.pulls.upstream_diverging_prompt_behind_n" .UpstreamDivergingInfo.CommitsBehind $upstreamHtml}}
{{else}}