Refactored according to suggestions

This commit is contained in:
Martin Hartkorn 2016-02-14 22:40:39 +01:00
parent 15394f613f
commit 15d37b7a95
5 changed files with 14 additions and 25 deletions

View file

@ -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)
}