The old methods are replaced by a simpler CanSign method needed in cmd as a
pre-run check.
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
This removes the sub-go.mod in favor of updating all references to the
third_party/go-git package.
This lets users `go install` from outside of the module.
Signed-off-by: Billy Lynch <billy@chainguard.dev>
This fixes a previously unnoticed bug in setting the test config where
the user's name and email were actually left blank. This is an issue
with how go-git parses the raw parts of the config vs the defined
structs. This was primarily noticed because of mismatched hashes on
GitHub actions in the tag, the expected values have changed in some
existing tests as well.
Signed-off-by: Aditya Sirish <aditya@saky.in>
This is a full fledged refactor of the cmd package based on this comment:
https://github.com/adityasaky/gittuf/pull/41#discussion_r1198995982.
First, the dev subcommand is retired as it was necessary to test certain
RSL functions which have now been built. The subcommand also printed out
the git config, again something we no longer need. To that end,
GetConfig() in gitinterface has been made private.
Second, the trust and policy subcommands have been reimplemented using
the recommended structure with specific packages that construct them
with their options.
Finally, the cmd package has been moved to the internal namespace.
Signed-off-by: Aditya Sirish <aditya@saky.in>
This package includes a set of helpers to interface with the underlying
git repository. Features:
* parse git configs to determine commit signing mechanism
* create and sign commit objects
Signed-off-by: Aditya Sirish <aditya@saky.in>