Skip to content

Commit 5c589b7

Browse files
committed
CB/debug
1 parent 31c0fc6 commit 5c589b7

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
@@ -576,6 +576,10 @@ func RepoAssignment(ctx *Context) (cancel context.CancelFunc) {
576576
return
577577
}
578578

579+
if ctx.Repo.GitRepo != nil {
580+
log.Error("CodebergDebug: GitRepo is not nil, this should never happen!")
581+
ctx.Repo.GitRepo.Close()
582+
}
579583
gitRepo, err := git.OpenRepositoryCtx(ctx, repo_model.RepoPath(userName, repoName))
580584
if err != nil {
581585
if strings.Contains(err.Error(), "repository does not exist") || strings.Contains(err.Error(), "no such file or directory") {

0 commit comments

Comments
 (0)