gittuf/pkg/gitinterface
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
..
blob.go
blob_test.go test: improve pkg/gitinterface coverage from 69.4% to 76.2% 2026-04-25 02:44:19 +05:30
changes.go
changes_test.go pkg/gitinterface: Add and refactor tests for coverage 2026-04-30 02:47:33 +05:30
commit.go Bump go-git to v6 2026-06-17 20:39:04 -04:00
commit_test.go Bump go-git to v6 2026-06-17 20:39:04 -04:00
common.go
config.go
config_test.go test: improve pkg/gitinterface coverage from 69.4% to 76.2% 2026-04-25 02:44:19 +05:30
hash.go
hash_test.go
log.go
log_test.go pkg/gitinterface: Remove unnecessary error return from createTestTrees 2026-05-01 23:50:02 +05:30
object.go
object_test.go test: improve pkg/gitinterface coverage from 69.4% to 76.2% 2026-04-25 02:44:19 +05:30
README.md
references.go
references_test.go pkg/gitinterface: Add and refactor tests for coverage 2026-04-30 02:47:33 +05:30
remote.go
remote_test.go
repository.go pkg/gitinterface: open go-git with DetectDotGit:false 2026-06-29 17:03:13 +01:00
repository_test.go pkg/gitinterface: open go-git with DetectDotGit:false 2026-06-29 17:03:13 +01:00
signature.go
signature_test.go pkg/gitinterface: Add and refactor tests for coverage 2026-04-30 02:47:33 +05:30
status.go fix: parse rename status 2026-04-30 01:41:16 +05:30
status_test.go Merge pull request #1273 from ayuxsh009/fix/status-rename-parser 2026-04-29 20:24:55 +00:00
sync.go
sync_test.go pkg: Increase testing coverage 2026-06-11 12:16:43 -04:00
tag.go Bump go-git to v6 2026-06-17 20:39:04 -04:00
tag_test.go pkg/gitinterface: Add and refactor tests for coverage 2026-04-30 02:47:33 +05:30
tree.go pkg: Drop support for Git versions older than v2.38.0 2026-06-10 09:56:56 -04:00
tree_test.go pkg/gitinterface: Add and refactor tests for coverage 2026-04-30 02:47:33 +05:30
utils.go pkg: Drop support for Git versions older than v2.38.0 2026-06-10 09:56:56 -04:00
utils_test.go test: improve pkg/gitinterface coverage from 69.4% to 76.2% 2026-04-25 02:44:19 +05:30

gittuf's gitinterface Package

gittuf's gitinterface package is a lightweight Go API for interacting with Git repositories. It is similar to go-git in its goal, but differs as, unlike go-git, gitinterface uses the Git binary for its operations.

To operate correctly, gitinterface requires a Git binary version of 2.34 or higher.