MCPcopy Create free account
hub / github.com/libgit2/git2go / CommitCreateCallback

FuncType CommitCreateCallback

commit.go:76–82  ·  view source on GitHub ↗

CommitCreateCallback defines a function type that is called when another function is going to create commits (for example, Rebase) to allow callers to override the commit creation behavior. For example, users may wish to sign commits by providing this information to Repository.CreateCommitBuffer, si

func(
	author, committer *Signature,
	messageEncoding MessageEncoding,
	message string,
	tree *Tree,
	parents ...*Commit,
) (oid *Oid, err error)

Source from the content-addressed store, hash-verified

74// sign commits by providing this information to Repository.CreateCommitBuffer,
75// signing that buffer, then calling Repository.CreateCommitWithSignature.
76type CommitCreateCallback func(
77 author, committer *Signature,
78 messageEncoding MessageEncoding,
79 message string,
80 tree *Tree,
81 parents ...*Commit,
82) (oid *Oid, err error)
83
84// WithSignatureUsing creates a new signed commit from this one using the given signing callback
85func (c *Commit) WithSignatureUsing(f CommitSigningCallback) (*Oid, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…