aboutsummaryrefslogtreecommitdiffstats
path: root/options.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2018-08-17 11:17:46 +0200
committerGitHub <noreply@github.com>2018-08-17 11:17:46 +0200
commit7b6c1266556f59ac436fada3fa6106d4a84f9b56 (patch)
treef2f9226dc9436848c4b4855f65d91bd89dc987da /options.go
parentba0f659cbf9982846de731cca426ce2498601130 (diff)
parent39954f2d9310204cc586715def7f075296a21d4c (diff)
downloadgo-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.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/options.go b/options.go
index 885980e..7b1570f 100644
--- a/options.go
+++ b/options.go
@@ -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.