summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-07-10 13:18:55 +0200
committerGitHub <noreply@github.com>2023-07-10 13:18:55 +0200
commit2f31d2d56c22400b2e79b279a5d0e845febba137 (patch)
treeb6e5d1aecacba0d9a4f8e2aeec9dcbb81f0bd623 /routers
parentFor API attachments, use API URL (#25639) (diff)
downloadforgejo-2f31d2d56c22400b2e79b279a5d0e845febba137.tar.xz
forgejo-2f31d2d56c22400b2e79b279a5d0e845febba137.zip
Exclude default branch from pushed branch hint (#25795)
When pushing to default branch, no pushing hint should be prompt. Fix #25778 --------- Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'routers')
-rw-r--r--routers/web/repo/view.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go
index acea08d629..ece2ec5416 100644
--- a/routers/web/repo/view.go
+++ b/routers/web/repo/view.go
@@ -982,7 +982,7 @@ func renderCode(ctx *context.Context) {
ctx.ServerError("GetBaseRepo", err)
return
}
- ctx.Data["RecentlyPushedNewBranches"], err = git_model.FindRecentlyPushedNewBranches(ctx, ctx.Repo.Repository.ID, ctx.Doer.ID)
+ ctx.Data["RecentlyPushedNewBranches"], err = git_model.FindRecentlyPushedNewBranches(ctx, ctx.Repo.Repository.ID, ctx.Doer.ID, ctx.Repo.Repository.DefaultBranch)
if err != nil {
ctx.ServerError("GetRecentlyPushedBranches", err)
return