gittuf/pkg/gitinterface
Andrew Nesbitt ac08370b1e
pkg/gitinterface: isolate TestCanSign from host git config
TestCanSign/explicit_ssh,_no_key sets gpg.format=ssh in a temp repo and
expects CanSign() to fail because no user.signingkey is set. On a host
with user.signingkey in ~/.gitconfig, the temp repo inherits the key via
scoped config and the test passes CanSign() unexpectedly.

The existing comment at the top of TestCanSign acknowledges this and
skips the assertion as a result. Point GIT_CONFIG_GLOBAL and
GIT_CONFIG_SYSTEM at /dev/null for the duration of the test instead, so
all subtests can run regardless of the host's signing config.

Signed-off-by: Andrew Nesbitt <andrewnez@gmail.com>
2026-06-29 17:14:01 +01:00
..
blob.go pkg: Move gitinterface to pkg 2026-01-16 14:03:36 -05:00
blob_test.go test: improve pkg/gitinterface coverage from 69.4% to 76.2% 2026-04-25 02:44:19 +05:30
changes.go pkg: Move gitinterface to pkg 2026-01-16 14:03:36 -05:00
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 pkg: Move gitinterface to pkg 2026-01-16 14:03:36 -05:00
config.go pkg: Move gitinterface to pkg 2026-01-16 14:03:36 -05:00
config_test.go test: improve pkg/gitinterface coverage from 69.4% to 76.2% 2026-04-25 02:44:19 +05:30
hash.go pkg: Move gitinterface to pkg 2026-01-16 14:03:36 -05:00
hash_test.go pkg: Move gitinterface to pkg 2026-01-16 14:03:36 -05:00
log.go pkg: Move gitinterface to pkg 2026-01-16 14:03:36 -05:00
log_test.go pkg/gitinterface: Remove unnecessary error return from createTestTrees 2026-05-01 23:50:02 +05:30
object.go pkg: Move gitinterface to pkg 2026-01-16 14:03:36 -05:00
object_test.go test: improve pkg/gitinterface coverage from 69.4% to 76.2% 2026-04-25 02:44:19 +05:30
README.md pkg: Move gitinterface to pkg 2026-01-16 14:03:36 -05:00
references.go pkg: Move gitinterface to pkg 2026-01-16 14:03:36 -05:00
references_test.go pkg/gitinterface: Add and refactor tests for coverage 2026-04-30 02:47:33 +05:30
remote.go pkg: Move gitinterface to pkg 2026-01-16 14:03:36 -05:00
remote_test.go pkg: Move gitinterface to pkg 2026-01-16 14:03:36 -05:00
repository.go Bump go-git to v6 2026-06-17 20:39:04 -04:00
repository_test.go pkg/gitinterface: Add and refactor tests for coverage 2026-04-30 02:47:33 +05:30
signature.go sigstore: Drop support for online verification 2026-02-19 12:39:22 -05:00
signature_test.go pkg/gitinterface: isolate TestCanSign from host git config 2026-06-29 17:14:01 +01:00
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 pkg: Move gitinterface to pkg 2026-01-16 14:03:36 -05:00
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.