summaryrefslogtreecommitdiffstats
path: root/modules/repository/fork.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/repository/fork.go')
-rw-r--r--modules/repository/fork.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/repository/fork.go b/modules/repository/fork.go
index 6025faca33..4cff4c24f8 100644
--- a/modules/repository/fork.go
+++ b/modules/repository/fork.go
@@ -95,14 +95,17 @@ func ForkRepository(doer, owner *models.User, oldRepo *models.Repository, name,
needsRollback = true
repoPath := models.RepoPath(owner.Name, repo.Name)
- if stdout, err := git.NewCommand(
- "clone", "--bare", oldRepoPath, repoPath).
+ if stdout, err := git.NewCommand("clone", "--bare", oldRepoPath, repoPath).
SetDescription(fmt.Sprintf("ForkRepository(git clone): %s to %s", oldRepo.FullName(), repo.FullName())).
RunInDirTimeout(10*time.Minute, ""); err != nil {
log.Error("Fork Repository (git clone) Failed for %v (from %v):\nStdout: %s\nError: %v", repo, oldRepo, stdout, err)
return fmt.Errorf("git clone: %v", err)
}
+ if err := repo.CheckDaemonExportOKCtx(ctx); err != nil {
+ return fmt.Errorf("checkDaemonExportOK: %v", err)
+ }
+
if stdout, err := git.NewCommand("update-server-info").
SetDescription(fmt.Sprintf("ForkRepository(git update-server-info): %s", repo.FullName())).
RunInDir(repoPath); err != nil {