mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Refactor INI package (first step) (#25024)
The INI package has many bugs and quirks, and in fact it is unmaintained. This PR is the first step for the INI package refactoring: * Use Gitea's "config_provider" to provide INI access * Deprecate the INI package by golangci.yml rule
This commit is contained in:
		@@ -27,7 +27,7 @@ import (
 | 
			
		||||
	"code.gitea.io/gitea/modules/timeutil"
 | 
			
		||||
	"code.gitea.io/gitea/modules/util"
 | 
			
		||||
 | 
			
		||||
	"gopkg.in/ini.v1"
 | 
			
		||||
	"gopkg.in/ini.v1" //nolint:depguard
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
@@ -241,7 +241,7 @@ func MigrateRepositoryGitData(ctx context.Context, u *user_model.User,
 | 
			
		||||
// cleanUpMigrateGitConfig removes mirror info which prevents "push --all".
 | 
			
		||||
// This also removes possible user credentials.
 | 
			
		||||
func cleanUpMigrateGitConfig(configPath string) error {
 | 
			
		||||
	cfg, err := ini.Load(configPath)
 | 
			
		||||
	cfg, err := ini.Load(configPath) // FIXME: the ini package doesn't really work with git config files
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return fmt.Errorf("open config file: %w", err)
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user