mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 16:21:51 +00:00 
			
		
		
		
	Remove duplicated checkinit on git module (#28824)
`checkInit` has been invoked in `InitSimple`. So it's unnecessary to invoke it twice in `InitFull`.
This commit is contained in:
		| @@ -166,10 +166,6 @@ func InitSimple(ctx context.Context) error { | |||||||
| // InitFull initializes git module with version check and change global variables, sync gitconfig. | // 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. | // 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) { | func InitFull(ctx context.Context) (err error) { | ||||||
| 	if err = checkInit(); err != nil { |  | ||||||
| 		return err |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	if err = InitSimple(ctx); err != nil { | 	if err = InitSimple(ctx); err != nil { | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user