MCPcopy Create free account
hub / github.com/belak/gitdir / Commit

Method Commit

internal/git/operations.go:76–86  ·  view source on GitHub ↗

Commit is a convenience method to make working with the worktree a little bit easier.

(msg string, author *object.Signature)

Source from the content-addressed store, hash-verified

74// Commit is a convenience method to make working with the worktree a little
75// bit easier.
76func (r *Repository) Commit(msg string, author *object.Signature) error {
77 if author == nil {
78 author = newAdminGitSignature()
79 }
80
81 _, err := r.Worktree.Commit(msg, &git.CommitOptions{
82 Author: author,
83 })
84
85 return err
86}

Callers 2

ensureConfigMethod · 0.80
EnsureAdminUserMethod · 0.80

Calls 1

newAdminGitSignatureFunction · 0.85

Tested by

no test coverage detected