diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-06-02 17:27:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-02 17:27:30 +0800 |
commit | de4a21fcb4476772c69c36d086549e89ed4dcf6c (patch) | |
tree | a8952b92bc6382daffc34178f5d6cc32cfea2efd /modules/repository/repo.go | |
parent | 7a5873335afb00dda5fa123fb023c88278e79deb (diff) | |
download | gitea-de4a21fcb4476772c69c36d086549e89ed4dcf6c.tar.gz gitea-de4a21fcb4476772c69c36d086549e89ed4dcf6c.zip |
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
Diffstat (limited to 'modules/repository/repo.go')
-rw-r--r-- | modules/repository/repo.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/repository/repo.go b/modules/repository/repo.go index 62e1f31b9e..3991e9ad99 100644 --- a/modules/repository/repo.go +++ b/modules/repository/repo.go @@ -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) } |