mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-20 16:10:50 +00:00
Correctly adjust mirror url (#6593)
This commit is contained in:
parent
01e0408fa1
commit
b3e757a06c
5 changed files with 70 additions and 14 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue