fix: git cmd (#38084) (#38087)

Backport #38084

fix #37370

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabot
2026-06-12 06:28:13 -07:00
committed by GitHub
parent 617b6948b1
commit 3bebddedc0
4 changed files with 15 additions and 3 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ type contextKey struct {
}
// RepositoryFromContextOrOpen attempts to get the repository from the context or just opens it
// The caller must call "defer gitRepo.Close()"
// The caller must call Closer.Close()
func RepositoryFromContextOrOpen(ctx context.Context, repo Repository) (*git.Repository, io.Closer, error) {
reqCtx := reqctx.FromContext(ctx)
if reqCtx != nil {