diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2018-08-17 11:17:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-17 11:17:46 +0200 |
commit | 7b6c1266556f59ac436fada3fa6106d4a84f9b56 (patch) | |
tree | f2f9226dc9436848c4b4855f65d91bd89dc987da /options.go | |
parent | ba0f659cbf9982846de731cca426ce2498601130 (diff) | |
parent | 39954f2d9310204cc586715def7f075296a21d4c (diff) | |
download | go-git-7b6c1266556f59ac436fada3fa6106d4a84f9b56.tar.gz |
Merge pull request #920 from vancluever/f-add-commit-signkeyv4.6.0
git: Add ability to PGP sign commits
Diffstat (limited to 'options.go')
-rw-r--r-- | options.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -4,6 +4,7 @@ import ( "errors" "regexp" + "golang.org/x/crypto/openpgp" "gopkg.in/src-d/go-git.v4/config" "gopkg.in/src-d/go-git.v4/plumbing" "gopkg.in/src-d/go-git.v4/plumbing/object" @@ -347,6 +348,9 @@ type CommitOptions struct { // Parents are the parents commits for the new commit, by default when // len(Parents) is zero, the hash of HEAD reference is used. Parents []plumbing.Hash + // A key to sign the commit with. A nil value here means the commit will not + // be signed. The private key must be present and already decrypted. + SignKey *openpgp.Entity } // Validate validates the fields and sets the default values. |