Skip to content

Commit 8b5c918

Browse files
GiteaBotlunny
andauthored
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>
1 parent 8b4abb1 commit 8b5c918

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)