You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Backport go-gitea#28422 by wxiaoguang
1. Do not sort the "checks" slice again and again when "Register", it
just wastes CPU when the Gitea instance runs
2. If a check doesn't exist, tell the end user
3. Add some tests
Co-authored-by: wxiaoguang <[email protected]>
// CmdDoctor represents the available doctor sub-command.
27
+
varCmdDoctor=&cli.Command{
28
+
Name: "doctor",
29
+
Usage: "Diagnose and optionally fix problems",
30
+
Description: "A command to diagnose problems with the current Gitea instance according to the given configuration. Some problems can optionally be fixed by modifying the database or data storage.",
31
+
32
+
Subcommands: []*cli.Command{
33
+
cmdDoctorCheck,
34
+
cmdRecreateTable,
35
+
cmdDoctorConvert,
36
+
},
37
+
}
38
+
25
39
varcmdDoctorCheck=&cli.Command{
26
40
Name: "check",
27
41
Usage: "Diagnose and optionally fix problems",
@@ -60,19 +74,6 @@ var cmdDoctorCheck = &cli.Command{
60
74
},
61
75
}
62
76
63
-
// CmdDoctor represents the available doctor sub-command.
64
-
varCmdDoctor=&cli.Command{
65
-
Name: "doctor",
66
-
Usage: "Diagnose and optionally fix problems",
67
-
Description: "A command to diagnose problems with the current Gitea instance according to the given configuration. Some problems can optionally be fixed by modifying the database or data storage.",
68
-
69
-
Subcommands: []*cli.Command{
70
-
cmdDoctorCheck,
71
-
cmdRecreateTable,
72
-
cmdDoctorConvert,
73
-
},
74
-
}
75
-
76
77
varcmdRecreateTable=&cli.Command{
77
78
Name: "recreate-table",
78
79
Usage: "Recreate tables from XORM definitions and copy the data.",
0 commit comments