aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/branch
diff options
context:
space:
mode:
authorKemal Zebari <60799661+kemzeb@users.noreply.github.com>2024-05-20 19:23:07 -0700
committerGitHub <noreply@github.com>2024-05-21 02:23:07 +0000
commit1007ce764ea80b48120b796175d7d1210cbb6f74 (patch)
tree950689c85b819ab744704f5df9f90cc70ab7bf8d /templates/repo/branch
parentba83d27ab037a3dbcb0c84b731c8030e9bdc26a8 (diff)
downloadgitea-1007ce764ea80b48120b796175d7d1210cbb6f74.tar.gz
gitea-1007ce764ea80b48120b796175d7d1210cbb6f74.zip
Don't include link of deleted branch when listing branches (#31028)
From https://github.com/go-gitea/gitea/issues/31018#issuecomment-2119622680. This commit removes the link to a deleted branch name because it returns a 404 while it is in this deleted state. GitHub also throws a 404 when navigating to a branch link that was just deleted, but this deleted branch is removed from the branch list after a page refresh. Since with Gitea this deleted branch would be kept around for quite some time (well, until the "cleanup deleted branches" cron job begins), it makes sense to not have this as a link that users can navigate to.
Diffstat (limited to 'templates/repo/branch')
-rw-r--r--templates/repo/branch/list.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl
index 77cccd65b7..dcfe082276 100644
--- a/templates/repo/branch/list.tmpl
+++ b/templates/repo/branch/list.tmpl
@@ -87,7 +87,7 @@
<td class="eight wide">
{{if .DBBranch.IsDeleted}}
<div class="flex-text-block">
- <a class="gt-ellipsis" href="{{$.RepoLink}}/src/branch/{{PathEscapeSegments .DBBranch.Name}}">{{.DBBranch.Name}}</a>
+ <span class="gt-ellipsis">{{.DBBranch.Name}}</span>
<button class="btn interact-fg tw-px-1" data-clipboard-text="{{.DBBranch.Name}}">{{svg "octicon-copy" 14}}</button>
</div>
<p class="info">{{ctx.Locale.Tr "repo.branch.deleted_by" .DBBranch.DeletedBy.Name}} {{TimeSinceUnix .DBBranch.DeletedUnix ctx.Locale}}</p>