Skip to content

Commit b0aa141

Browse files
kemzebGiteaBot
authored andcommitted
Don't include link of deleted branch when listing branches (go-gitea#31028)
From go-gitea#31018 (comment). 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.
1 parent 55cb356 commit b0aa141

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

templates/repo/branch/list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
<td class="eight wide">
8888
{{if .DBBranch.IsDeleted}}
8989
<div class="flex-text-block">
90-
<a class="gt-ellipsis" href="{{$.RepoLink}}/src/branch/{{PathEscapeSegments .DBBranch.Name}}">{{.DBBranch.Name}}</a>
90+
<span class="gt-ellipsis">{{.DBBranch.Name}}</span>
9191
<button class="btn interact-fg tw-px-1" data-clipboard-text="{{.DBBranch.Name}}">{{svg "octicon-copy" 14}}</button>
9292
</div>
9393
<p class="info">{{ctx.Locale.Tr "repo.branch.deleted_by" .DBBranch.DeletedBy.Name}} {{TimeSinceUnix .DBBranch.DeletedUnix ctx.Locale}}</p>

0 commit comments

Comments
 (0)