Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCommitSignature ¶ added in v15.4.0
CreateCommitSignature reads the given signing key and produces PKCS#7 detached signature. When the path to the signing key is not present, an empty signature is returned.
func OpenRepository ¶
func OpenRepository(path string) (*git.Repository, error)
OpenRepository opens the repository located at path as a Git2Go repository.
Types ¶
type CommitSubmitter ¶ added in v15.4.0
type CommitSubmitter struct { Repo *git.Repository SigningKeyPath string }
CommitSubmitter is the helper struct to make signed Commits conveniently.
func NewCommitSubmitter ¶ added in v15.4.0
func NewCommitSubmitter(repo *git.Repository, signingKeyPath string) *CommitSubmitter
NewCommitSubmitter creates a new CommitSubmitter.
func (*CommitSubmitter) Commit ¶ added in v15.4.0
func (cs *CommitSubmitter) Commit( author, committer *git.Signature, messageEncoding git.MessageEncoding, message string, tree *git.Tree, parents ...*git.Commit, ) (*git.Oid, error)
Commit commits a commit with or without OpenPGP signature depends on SigningKeyPath value.
Click to show internal directories.
Click to hide internal directories.