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

Method WithSignatureUsing

commit.go:85–92  ·  view source on GitHub ↗

WithSignatureUsing creates a new signed commit from this one using the given signing callback

(f CommitSigningCallback)

Source from the content-addressed store, hash-verified

83
84// WithSignatureUsing creates a new signed commit from this one using the given signing callback
85func (c *Commit) WithSignatureUsing(f CommitSigningCallback) (*Oid, error) {
86 signature, signatureField, err := f(c.ContentToSign())
87 if err != nil {
88 return nil, err
89 }
90
91 return c.WithSignature(signature, signatureField)
92}
93
94// WithSignature creates a new signed commit from the given signature and signature field
95func (c *Commit) WithSignature(signature string, signatureField string) (*Oid, error) {

Callers 1

commitSomethingFunction · 0.80

Calls 2

ContentToSignMethod · 0.95
WithSignatureMethod · 0.95

Tested by 1

commitSomethingFunction · 0.64