diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-07-18 13:31:57 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-07-18 13:31:57 -0700 |
| commit | ba69ae876b0462831cab94e43d1e2876dce3e4cd (patch) | |
| tree | a04c3e8737a33f6a4cd4ead29d63d26a5ffd6c3e /gpg-interface.h | |
| parent | Merge branch 'ab/cocci-unused' (diff) | |
| parent | gpg-interface: add function for converting trust level to string (diff) | |
| download | git-ba69ae876b0462831cab94e43d1e2876dce3e4cd.tar.gz git-ba69ae876b0462831cab94e43d1e2876dce3e4cd.zip | |
Merge branch 'jd/gpg-interface-trust-level-string'
The code to convert between GPG trust level strings and internal
constants we use to represent them have been cleaned up.
* jd/gpg-interface-trust-level-string:
gpg-interface: add function for converting trust level to string
Diffstat (limited to 'gpg-interface.h')
| -rw-r--r-- | gpg-interface.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gpg-interface.h b/gpg-interface.h index b30cbdcd3d..8a9ef41779 100644 --- a/gpg-interface.h +++ b/gpg-interface.h @@ -71,6 +71,14 @@ size_t parse_signed_buffer(const char *buf, size_t size); int sign_buffer(struct strbuf *buffer, struct strbuf *signature, const char *signing_key); + +/* + * Returns corresponding string in lowercase for a given member of + * enum signature_trust_level. For example, `TRUST_ULTIMATE` will + * return "ultimate". + */ +const char *gpg_trust_level_to_str(enum signature_trust_level level); + int git_gpg_config(const char *, const char *, void *); void set_signing_key(const char *); const char *get_signing_key(void); |
