From 2f31d2d56c22400b2e79b279a5d0e845febba137 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 10 Jul 2023 19:18:55 +0800 Subject: 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 --- routers/web/repo/view.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routers') 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 -- cgit v1.2.3