summaryrefslogtreecommitdiffstats
path: root/modules/repository/adopt.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-10-13 20:47:02 +0100
committerGitHub <noreply@github.com>2021-10-13 20:47:02 +0100
commit5a8dd96b33ac6e91a5c40fc4ef867625ca6ec88e (patch)
tree5b57df8b2b234382f438015348f201f96f264c7f /modules/repository/adopt.go
parent01b9d35f1a0188dadc1ee09f5e4dd98acc38ff09 (diff)
downloadgitea-5a8dd96b33ac6e91a5c40fc4ef867625ca6ec88e.tar.gz
gitea-5a8dd96b33ac6e91a5c40fc4ef867625ca6ec88e.zip
Ensure that git daemon export ok is created for mirrors (#17243)
* Ensure that git daemon export ok is created for mirrors There is an issue with #16508 where it appears that create repo requires that the repo does not exist. This causes #17241 where an error is reported because of this. This PR fixes this and also runs update-server-info for mirrors and generated repos. Fix #17241 Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/repository/adopt.go')
-rw-r--r--modules/repository/adopt.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/repository/adopt.go b/modules/repository/adopt.go
index c5c059f471..21477ab7d7 100644
--- a/modules/repository/adopt.go
+++ b/modules/repository/adopt.go
@@ -68,6 +68,9 @@ func AdoptRepository(doer, u *models.User, opts models.CreateRepoOptions) (*mode
if err := adoptRepository(ctx, repoPath, doer, repo, opts); err != nil {
return fmt.Errorf("createDelegateHooks: %v", err)
}
+ if err := repo.CheckDaemonExportOK(ctx); err != nil {
+ return fmt.Errorf("checkDaemonExportOK: %v", err)
+ }
// Initialize Issue Labels if selected
if len(opts.IssueLabels) > 0 {