aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormetiftikci <metiftikci@hotmail.com>2024-05-25 17:02:07 +0300
committerGitHub <noreply@github.com>2024-05-25 14:02:07 +0000
commit47e715a70ff1802fae27d8d922b3185a3d83d640 (patch)
treea7bb1254d0d6a5cff877f36fcd210383cafcebf0
parentec771fdfcdbc74320b1ef0252444aa5cddd50a04 (diff)
downloadgitea-47e715a70ff1802fae27d8d922b3185a3d83d640.tar.gz
gitea-47e715a70ff1802fae27d8d922b3185a3d83d640.zip
Fix `View File` button link if branch deleted on pull request files pages (#31063)
as title
-rw-r--r--routers/web/repo/pull.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go
index bbdc6ca631..92e0a1674e 100644
--- a/routers/web/repo/pull.go
+++ b/routers/web/repo/pull.go
@@ -862,7 +862,7 @@ func viewPullFiles(ctx *context.Context, specifiedStartCommit, specifiedEndCommi
}
if pull.HeadRepo != nil {
- ctx.Data["SourcePath"] = pull.HeadRepo.Link() + "/src/branch/" + util.PathEscapeSegments(pull.HeadBranch)
+ ctx.Data["SourcePath"] = pull.HeadRepo.Link() + "/src/commit/" + endCommitID
if !pull.HasMerged && ctx.Doer != nil {
perm, err := access_model.GetUserRepoPermission(ctx, pull.HeadRepo, ctx.Doer)