From bd6ef718548767ff209048eb8443a067106908bf Mon Sep 17 00:00:00 2001 From: delvh Date: Thu, 27 Jul 2023 12:47:41 +0200 Subject: Show branches and tags that contain a commit (#25180) Now, you can see for a commit which existing branches and tags contain it. You first have to click on the `load branches and tags` button, they are not preloaded by default. All branches and tags are ordered descending by creation date. You can even see without much hassle if the given commit is already part of the default branch. Closes #25152 ## Screenshots ### Initial ![image](https://github.com/go-gitea/gitea/assets/51889757/84db2c0b-aaef-4f69-ab92-0b812793d2ad) ### Loaded ![image](https://github.com/go-gitea/gitea/assets/51889757/a9b84e66-8e44-4c55-b017-c37f4a45f41b) --------- Co-authored-by: silverwind Co-authored-by: wxiaoguang --- modules/context/context_response.go | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/context') diff --git a/modules/context/context_response.go b/modules/context/context_response.go index bb3ccf69ce..9dc6d1fc0e 100644 --- a/modules/context/context_response.go +++ b/modules/context/context_response.go @@ -166,6 +166,7 @@ func (ctx *Context) serverErrorInternal(logMsg string, logErr error) { // NotFoundOrServerError use error check function to determine if the error // is about not found. It responds with 404 status code for not found error, // or error context description for logging purpose of 500 server error. +// TODO: remove the "errCheck" and use util.ErrNotFound to check func (ctx *Context) NotFoundOrServerError(logMsg string, errCheck func(error) bool, logErr error) { if errCheck(logErr) { ctx.notFoundInternal(logMsg, logErr) -- cgit v1.2.3