Skip to content

Commit 6708932

Browse files
lunnyfuxiaohei
authored andcommitted
Remove duplicated checkinit on git module (go-gitea#28824)
`checkInit` has been invoked in `InitSimple`. So it's unnecessary to invoke it twice in `InitFull`.
1 parent 9a4738f commit 6708932

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

modules/git/git.go

-4
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,6 @@ func InitSimple(ctx context.Context) error {
166166
// InitFull initializes git module with version check and change global variables, sync gitconfig.
167167
// It should only be called once at the beginning of the program initialization (TestMain/GlobalInitInstalled) as this code makes unsynchronized changes to variables.
168168
func InitFull(ctx context.Context) (err error) {
169-
if err = checkInit(); err != nil {
170-
return err
171-
}
172-
173169
if err = InitSimple(ctx); err != nil {
174170
return err
175171
}

0 commit comments

Comments
 (0)