Finish migrating repository and/or wiki with things that don't need to be done for mirrors.
(repo *Repository)
| 918 | |
| 919 | // Finish migrating repository and/or wiki with things that don't need to be done for mirrors. |
| 920 | func CleanUpMigrateInfo(repo *Repository) (*Repository, error) { |
| 921 | repoPath := repo.RepoPath() |
| 922 | if err := createDelegateHooks(repoPath); err != nil { |
| 923 | return repo, errors.Newf("createDelegateHooks: %v", err) |
| 924 | } |
| 925 | if repo.HasWiki() { |
| 926 | if err := createDelegateHooks(repo.WikiPath()); err != nil { |
| 927 | return repo, errors.Newf("createDelegateHooks.(wiki): %v", err) |
| 928 | } |
| 929 | } |
| 930 | |
| 931 | if err := cleanUpMigrateGitConfig(repo.GitConfigPath()); err != nil { |
| 932 | return repo, errors.Newf("cleanUpMigrateGitConfig: %v", err) |
| 933 | } |
| 934 | if repo.HasWiki() { |
| 935 | if err := cleanUpMigrateGitConfig(path.Join(repo.WikiPath(), "config")); err != nil { |
| 936 | return repo, errors.Newf("cleanUpMigrateGitConfig.(wiki): %v", err) |
| 937 | } |
| 938 | } |
| 939 | |
| 940 | return repo, UpdateRepository(repo, false) |
| 941 | } |
| 942 | |
| 943 | // initRepoCommit temporarily changes with work directory. |
| 944 | func initRepoCommit(tmpPath string, sig *git.Signature) (err error) { |
no test coverage detected