From 1dbc58f742febbe58df59d4ce4148d2dbec1a20f Mon Sep 17 00:00:00 2001 From: zeripath Date: Mon, 22 Nov 2021 22:32:16 +0000 Subject: More pleasantly handle broken or missing git repositories (#17747) * More pleasantly handle broken or missing git repositories In #17742 it was noted that there a completely invalid git repository underlying a repo on gitea.com. This happened due to a problem during a migration however, it is not beyond the realms of possibility that a corruption could occur to another user. This PR adds a check to RepoAssignment that will detect if a repository loading has failed due to an absent git repository. It will then show a page suggesting the user contacts the administrator or deletes the repository. Fix #17742 Signed-off-by: Andrew Thornton * Update options/locale/locale_en-US.ini Co-authored-by: techknowlogick Co-authored-by: techknowlogick --- options/locale/locale_en-US.ini | 1 + 1 file changed, 1 insertion(+) (limited to 'options') diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 6e39b4b03d..ca6cd66625 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -946,6 +946,7 @@ clone_this_repo = Clone this repository create_new_repo_command = Creating a new repository on the command line push_exist_repo = Pushing an existing repository from the command line empty_message = This repository does not contain any content. +broken_message = The git data underlying this repository cannot be read. Contact the administrator of this instance or delete this repository. code = Code code.desc = Access source code, files, commits and branches. -- cgit v1.2.3