1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-13 13:08:19 +00:00

Correctly adjust mirror url (#6593) (#6595)

This commit is contained in:
zeripath
2019-04-13 02:26:09 +01:00
committed by techknowlogick
parent 4ff6effe04
commit bac388d27c
12 changed files with 2102 additions and 21 deletions

View File

@@ -1066,9 +1066,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)