aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2024-01-17 17:56:00 +0800
committerGitHub <noreply@github.com>2024-01-17 09:56:00 +0000
commitc8ba17c73ff455ea381c8ab5a81f77d545a672fd (patch)
treef4dbcbca9b8527ced9840c0e0e5798ee48695361
parent2bdab948cbbd7b348621f853bb8aecd8a74aa3ee (diff)
downloadgitea-c8ba17c73ff455ea381c8ab5a81f77d545a672fd.tar.gz
gitea-c8ba17c73ff455ea381c8ab5a81f77d545a672fd.zip
Remove duplicated checkinit on git module (#28824)
`checkInit` has been invoked in `InitSimple`. So it's unnecessary to invoke it twice in `InitFull`.
-rw-r--r--modules/git/git.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/modules/git/git.go b/modules/git/git.go
index 166655eb73..24eff05afc 100644
--- a/modules/git/git.go
+++ b/modules/git/git.go
@@ -166,10 +166,6 @@ func InitSimple(ctx context.Context) error {
// InitFull initializes git module with version check and change global variables, sync gitconfig.
// It should only be called once at the beginning of the program initialization (TestMain/GlobalInitInstalled) as this code makes unsynchronized changes to variables.
func InitFull(ctx context.Context) (err error) {
- if err = checkInit(); err != nil {
- return err
- }
-
if err = InitSimple(ctx); err != nil {
return err
}