mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Fix git empty check and HEAD request (#33690)
This commit is contained in:
		| @@ -291,6 +291,11 @@ func RepoRefForAPI(next http.Handler) http.Handler { | ||||
| 	return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { | ||||
| 		ctx := GetAPIContext(req) | ||||
|  | ||||
| 		if ctx.Repo.Repository.IsEmpty { | ||||
| 			ctx.APIErrorNotFound("repository is empty") | ||||
| 			return | ||||
| 		} | ||||
|  | ||||
| 		if ctx.Repo.GitRepo == nil { | ||||
| 			ctx.APIErrorInternal(fmt.Errorf("no open git repo")) | ||||
| 			return | ||||
|   | ||||
		Reference in New Issue
	
	Block a user