We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 24fccda commit 4178196Copy full SHA for 4178196
1 file changed
command/report/git.go
@@ -63,8 +63,12 @@ func gitGetHead(workspaceDir string) (string, error) {
63
// Fetches the latest commit hash using the command `git rev-parse HEAD`
64
// through go-git
65
func fetchHeadManually(directoryPath string) (string, error) {
66
+ gitOpts := &git.PlainOpenOptions{
67
+ DetectDotGit: true,
68
+ }
69
+
70
// Open a new repository targeting the given path (the .git folder)
- repo, err := git.PlainOpen(directoryPath)
71
+ repo, err := git.PlainOpenWithOptions(directoryPath, gitOpts)
72
if err != nil {
73
return "", err
74
}
0 commit comments