mirror of
https://github.com/go-gitea/gitea
synced 2025-07-14 22:47:21 +00:00
Correctly adjust mirror url (#6593)
This commit is contained in:
@ -1077,9 +1077,11 @@ func CleanUpMigrateInfo(repo *Repository) (*Repository, error) {
|
||||
}
|
||||
}
|
||||
|
||||
if err := cleanUpMigrateGitConfig(repo.GitConfigPath()); err != nil {
|
||||
return repo, fmt.Errorf("cleanUpMigrateGitConfig: %v", err)
|
||||
_, err := git.NewCommand("remote", "remove", "origin").RunInDir(repoPath)
|
||||
if err != nil && !strings.HasPrefix(err.Error(), "exit status 128 - fatal: No such remote ") {
|
||||
return repo, fmt.Errorf("CleanUpMigrateInfo: %v", err)
|
||||
}
|
||||
|
||||
if repo.HasWiki() {
|
||||
if err := cleanUpMigrateGitConfig(path.Join(repo.WikiPath(), "config")); err != nil {
|
||||
return repo, fmt.Errorf("cleanUpMigrateGitConfig (wiki): %v", err)
|
||||
|
Reference in New Issue
Block a user