Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pkg/app/piped/eventwatcher/eventwatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,14 @@ func (w *watcher) run(ctx context.Context, repo git.Repo, repoCfg config.PipedRe
w.logger.Info("Try to re-clone because it's more likely to be unable to pull the next time too",
zap.String("repo-id", repoCfg.RepoID),
)
repo, err = w.cloneRepo(ctx, repoCfg)
newRepo, err := w.cloneRepo(ctx, repoCfg)
if err != nil {
w.logger.Error("failed to re-clone repository",
zap.String("repo-id", repoCfg.RepoID),
zap.Error(err),
)
} else {
repo = newRepo
}
continue
}
Expand Down
4 changes: 3 additions & 1 deletion pkg/app/pipedv1/eventwatcher/eventwatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,14 @@ func (w *watcher) run(ctx context.Context, repo git.Repo, repoCfg config.PipedRe
w.logger.Info("Try to re-clone because it's more likely to be unable to pull the next time too",
zap.String("repo-id", repoCfg.RepoID),
)
repo, err = w.cloneRepo(ctx, repoCfg)
newRepo, err := w.cloneRepo(ctx, repoCfg)
if err != nil {
w.logger.Error("failed to re-clone repository",
zap.String("repo-id", repoCfg.RepoID),
zap.Error(err),
)
} else {
repo = newRepo
}
continue
}
Expand Down