summaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-04-05 14:15:16 -0700
committerJunio C Hamano <gitster@pobox.com>2013-04-05 14:15:16 -0700
commitd5fec92a7af5c42217f3d1c707191791230bdefc (patch)
tree772e89712d4247cae1c934408e4af0e6862e8914 /commit.h
parent7b72ec5e14656af2d48c7a2a0b7251c35903bbaf (diff)
parente290c4b944f109aff26cc3db4ae0aec92f3cc126 (diff)
downloadgit-d5fec92a7af5c42217f3d1c707191791230bdefc.tar.gz
Merge branch 'sg/gpg-sig'
Teach "merge/pull" to optionally verify and reject commits that are not signed properly. * sg/gpg-sig: pretty printing: extend %G? to include 'N' and 'U' merge/pull Check for untrusted good GPG signatures merge/pull: verify GPG signatures of commits being merged commit.c/GPG signature verification: Also look at the first GPG status line Move commit GPG signature verification to commit.c
Diffstat (limited to 'commit.h')
-rw-r--r--commit.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/commit.h b/commit.h
index 2d90d9c27c..87b4b6cc0c 100644
--- a/commit.h
+++ b/commit.h
@@ -5,6 +5,7 @@
#include "tree.h"
#include "strbuf.h"
#include "decorate.h"
+#include "gpg-interface.h"
struct commit_list {
struct commit *item;
@@ -232,4 +233,13 @@ extern void print_commit_list(struct commit_list *list,
const char *format_cur,
const char *format_last);
+/*
+ * Check the signature of the given commit. The result of the check is stored
+ * in sig->check_result, 'G' for a good signature, 'U' for a good signature
+ * from an untrusted signer, 'B' for a bad signature and 'N' for no signature
+ * at all. This may allocate memory for sig->gpg_output, sig->gpg_status,
+ * sig->signer and sig->key.
+ */
+extern void check_commit_signature(const struct commit* commit, struct signature_check *sigc);
+
#endif /* COMMIT_H */