Skip to content

Commit

Permalink
Merge pull request #37 from Penpen7/search_git_repository
Browse files Browse the repository at this point in the history
PPROTEIN_GIT_REPOSITORY配下だけでなく、その親ディレクトリも含めてgitレポジトリを探索するように修正
  • Loading branch information
kaz authored Nov 7, 2024
2 parents ff54b05 + adbb326 commit 6c12aea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/git/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ type (
)

func GetInfo(repoDir string) (*RepositoryInfo, error) {
repo, err := git.PlainOpen(repoDir)
repo, err := git.PlainOpenWithOptions(repoDir, &git.PlainOpenOptions{
DetectDotGit: true,
})
if err != nil {
return nil, fmt.Errorf("failed to open git repo: %w", err)
}
Expand Down

0 comments on commit 6c12aea

Please sign in to comment.