mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-21 03:57:18 -04:00
Refactored according to suggestions
This commit is contained in:
parent
15394f613f
commit
15d37b7a95
5 changed files with 14 additions and 25 deletions
|
@ -654,7 +654,7 @@ func MigrateRepository(u *User, opts MigrateRepoOptions) (*Repository, error) {
|
|||
return repo, UpdateRepository(repo, false)
|
||||
}
|
||||
|
||||
repo, err = FinishMigrateRepository(repo, repoPath)
|
||||
repo, err = CleanUpMigrateInfo(repo, repoPath)
|
||||
if err != nil {
|
||||
return repo, err
|
||||
}
|
||||
|
@ -663,7 +663,7 @@ func MigrateRepository(u *User, opts MigrateRepoOptions) (*Repository, error) {
|
|||
}
|
||||
|
||||
// Finish migrating repository with things that don't need to be done for mirrors.
|
||||
func FinishMigrateRepository(repo *Repository, repoPath string) (*Repository, error) {
|
||||
func CleanUpMigrateInfo(repo *Repository, repoPath string) (*Repository, error) {
|
||||
if err := createUpdateHook(repoPath); err != nil {
|
||||
return repo, fmt.Errorf("createUpdateHook: %v", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue