Skip to content

Commit

Permalink
Remove duplicated checkinit on git module (go-gitea#28824)
Browse files Browse the repository at this point in the history
`checkInit` has been invoked in `InitSimple`. So it's unnecessary to
invoke it twice in `InitFull`.
  • Loading branch information
lunny authored and Henry Goodman committed Jan 31, 2024
1 parent 09b8b96 commit c5c80ee
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions modules/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit c5c80ee

Please sign in to comment.