From d07b00b7f31d0cb6675b4bdba269ce7f087ddd24 Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Mon, 23 Jun 2014 09:05:49 +0200 Subject: verify-commit: scriptable commit signature verification Commit signatures can be verified using "git show -s --show-signature" or the "%G?" pretty format and parsing the output, which is well suited for user inspection, but not for scripting. Provide a command "verify-commit" which is analogous to "verify-tag": It returns 0 for good signatures and non-zero otherwise, has the gpg output on stderr and (optionally) the commit object on stdout, sans the signature, just like "verify-tag" does. Signed-off-by: Michael J Gruber Signed-off-by: Junio C Hamano --- builtin.h | 1 + 1 file changed, 1 insertion(+) (limited to 'builtin.h') diff --git a/builtin.h b/builtin.h index c47c110e0f..5d91f31ca2 100644 --- a/builtin.h +++ b/builtin.h @@ -128,6 +128,7 @@ extern int cmd_update_server_info(int argc, const char **argv, const char *prefi extern int cmd_upload_archive(int argc, const char **argv, const char *prefix); extern int cmd_upload_archive_writer(int argc, const char **argv, const char *prefix); extern int cmd_var(int argc, const char **argv, const char *prefix); +extern int cmd_verify_commit(int argc, const char **argv, const char *prefix); extern int cmd_verify_tag(int argc, const char **argv, const char *prefix); extern int cmd_version(int argc, const char **argv, const char *prefix); extern int cmd_whatchanged(int argc, const char **argv, const char *prefix); -- cgit v1.2.3