From 30688c346f70953eecbdff096c8da3d9656ba062 Mon Sep 17 00:00:00 2001 From: Alisher Nurmanov Date: Fri, 7 Nov 2025 04:50:01 +0500 Subject: [PATCH] [AIR-1901] qs: [main.main:13]: error checking branch existence: failed to open cloned repository: repository does not exist --- gitcmds/gitcmds.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gitcmds/gitcmds.go b/gitcmds/gitcmds.go index ae95f8c..a62b54f 100644 --- a/gitcmds/gitcmds.go +++ b/gitcmds/gitcmds.go @@ -3128,7 +3128,9 @@ func GetIssueDescription(notes []string) (string, error) { // OpenGitRepository opens a git repository at the specified directory func OpenGitRepository(dir string) (*goGitPkg.Repository, error) { - repo, err := goGitPkg.PlainOpen(dir) + repo, err := goGitPkg.PlainOpenWithOptions(dir, &goGitPkg.PlainOpenOptions{ + DetectDotGit: true, + }) if err != nil { if errors.Is(err, goGitPkg.ErrRepositoryNotExists) { return nil, errors.New("no .git directory found; please run this command inside a git repository")