Skip to content

Commit 5471311

Browse files
committed
CB/debug: check for second case
1 parent 5c589b7 commit 5471311

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/context/repo.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,10 @@ func RepoAssignment(ctx *Context) (cancel context.CancelFunc) {
604604
if ctx.Repo.GitRepo != nil {
605605
ctx.Repo.GitRepo.Close()
606606
}
607+
if ctx.Repo.GitRepo != gitRepo {
608+
log.Error("CodebergDebug: ctx.Repo.GitRepo got overwritten without closing old one, this should never happen!")
609+
gitRepo.Close()
610+
}
607611
}
608612

609613
// Stop at this point when the repo is empty.

0 commit comments

Comments
 (0)