gittuf/pkg
Andrew Nesbitt bf84dfd79a
pkg/gitinterface: open go-git with DetectDotGit:false
GetGoGitRepository was passing DetectDotGit:true to PlainOpenWithOptions
on a path that is already the resolved git directory (set from
'git rev-parse --git-dir' in LoadRepository). With detect on, go-git
looks for a .git entry inside that path; a bare repository has none, so
it returns ErrRepositoryNotExists and every caller (verifyCommitSignature,
tag verification) fails on bare repos.

DetectDotGit:false treats the path as the git dir directly and opens
both bare and working-tree layouts.

Adds tests covering GetGoGitRepository on bare repos including the
forge-conventional <name>.git layout.

Signed-off-by: Andrew Nesbitt <andrewnez@gmail.com>
2026-06-29 17:03:13 +01:00
..
gitinterface pkg/gitinterface: open go-git with DetectDotGit:false 2026-06-29 17:03:13 +01:00