Backport #17243 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>
This commit is contained in:
parent
9c2b7a196e
commit
a20ccec369
6 changed files with 79 additions and 28 deletions
|
@ -66,6 +66,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.CheckDaemonExportOKCtx(ctx); err != nil {
|
||||
return fmt.Errorf("checkDaemonExportOK: %v", err)
|
||||
}
|
||||
|
||||
// Initialize Issue Labels if selected
|
||||
if len(opts.IssueLabels) > 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue