mirror of
https://github.com/go-gitea/gitea
synced 2024-11-17 23:41:49 +01:00
parent
de8b73dd92
commit
6e5fffbd3f
1 changed files with 5 additions and 2 deletions
|
@ -691,7 +691,6 @@ func MigrateRepository(u *User, opts MigrateRepoOptions) (*Repository, error) {
|
||||||
|
|
||||||
wikiRemotePath := wikiRemoteURL(opts.RemoteAddr)
|
wikiRemotePath := wikiRemoteURL(opts.RemoteAddr)
|
||||||
if len(wikiRemotePath) > 0 {
|
if len(wikiRemotePath) > 0 {
|
||||||
|
|
||||||
if err := os.RemoveAll(wikiPath); err != nil {
|
if err := os.RemoveAll(wikiPath); err != nil {
|
||||||
return repo, fmt.Errorf("Fail to remove %s: %v", wikiPath, err)
|
return repo, fmt.Errorf("Fail to remove %s: %v", wikiPath, err)
|
||||||
}
|
}
|
||||||
|
@ -700,8 +699,12 @@ func MigrateRepository(u *User, opts MigrateRepoOptions) (*Repository, error) {
|
||||||
Mirror: true,
|
Mirror: true,
|
||||||
Quiet: true,
|
Quiet: true,
|
||||||
Timeout: migrateTimeout,
|
Timeout: migrateTimeout,
|
||||||
|
Branch: "master",
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
log.Info("Clone wiki: %v", err)
|
log.Warn("Clone wiki: %v", err)
|
||||||
|
if err := os.RemoveAll(wikiPath); err != nil {
|
||||||
|
return repo, fmt.Errorf("Fail to remove %s: %v", wikiPath, err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue