Remove duplicated checkinit on git module (#28824) (#28831)

Backport #28824 by @lunny

`checkInit` has been invoked in `InitSimple`. So it's unnecessary to
invoke it twice in `InitFull`.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
(cherry picked from commit 8b5c9186a54b2e177fc58295ecd83bfc4700cbfd)
This commit is contained in:
Giteabot 2024-01-17 18:16:33 +08:00 committed by Earl Warren
parent 84f3ef2586
commit cdaf0dc752
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -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
}