diff options
author | Lukas Puehringer <luk.puehringer@gmail.com> | 2017-01-17 18:37:18 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-01-17 16:10:22 -0800 |
commit | 94240b918f70560393516aa8f98edb877d582c69 (patch) | |
tree | bbf21ce1762c8d76d5a3be3182212b12dd387540 | |
parent | 3ef7618e616e023cf04180e30d77c9fa5310f964 (diff) | |
download | git-94240b918f70560393516aa8f98edb877d582c69.tar.gz |
gpg-interface, tag: add GPG_VERIFY_OMIT_STATUS flag
Functions that print git object information may require that the
gpg-interface functions be silent. Add GPG_VERIFY_OMIT_STATUS flag and
prevent print_signature_buffer from being called if flag is set.
Signed-off-by: Lukas Puehringer <luk.puehringer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | gpg-interface.h | 5 | ||||
-rw-r--r-- | tag.c | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/gpg-interface.h b/gpg-interface.h index ea68885ad5..d2d4fd3a65 100644 --- a/gpg-interface.h +++ b/gpg-interface.h @@ -1,8 +1,9 @@ #ifndef GPG_INTERFACE_H #define GPG_INTERFACE_H -#define GPG_VERIFY_VERBOSE 1 -#define GPG_VERIFY_RAW 2 +#define GPG_VERIFY_VERBOSE 1 +#define GPG_VERIFY_RAW 2 +#define GPG_VERIFY_OMIT_STATUS 4 struct signature_check { char *payload; @@ -3,6 +3,7 @@ #include "commit.h" #include "tree.h" #include "blob.h" +#include "gpg-interface.h" const char *tag_type = "tag"; @@ -24,7 +25,9 @@ static int run_gpg_verify(const char *buf, unsigned long size, unsigned flags) ret = check_signature(buf, payload_size, buf + payload_size, size - payload_size, &sigc); - print_signature_buffer(&sigc, flags); + + if (!(flags & GPG_VERIFY_OMIT_STATUS)) + print_signature_buffer(&sigc, flags); signature_check_clear(&sigc); return ret; |