MCPcopy Create free account
hub / github.com/gogs/gogs / CleanUpMigrateInfo

Function CleanUpMigrateInfo

internal/database/repo.go:920–941  ·  view source on GitHub ↗

Finish migrating repository and/or wiki with things that don't need to be done for mirrors.

(repo *Repository)

Source from the content-addressed store, hash-verified

918
919// Finish migrating repository and/or wiki with things that don't need to be done for mirrors.
920func 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.
944func initRepoCommit(tmpPath string, sig *git.Signature) (err error) {

Callers 2

SettingsPostFunction · 0.92
MigrateRepositoryFunction · 0.85

Calls 7

createDelegateHooksFunction · 0.85
cleanUpMigrateGitConfigFunction · 0.85
UpdateRepositoryFunction · 0.85
RepoPathMethod · 0.80
HasWikiMethod · 0.80
WikiPathMethod · 0.80
GitConfigPathMethod · 0.80

Tested by

no test coverage detected