Remove duplicated checkinit on git module (#28824)

`checkInit` has been invoked in `InitSimple`. So it's unnecessary to
invoke it twice in `InitFull`.
pull/28823/head^2
Lunny Xiao 10 months ago committed by GitHub
parent 2bdab948cb
commit c8ba17c73f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      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
}

Loading…
Cancel
Save