diff options
| author | Justin Tobler <jltobler@gmail.com> | 2026-03-26 14:14:11 -0500 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-26 12:42:57 -0700 |
| commit | 4c36345e04cbef7edb94557119acba9f9a38c26f (patch) | |
| tree | 88a1c65ff664d9496c69064d9c34ae2d4707e771 /gpg-interface.c | |
| parent | 6d35cc472e24394edb21a9b4d0abe25f5b2a91f2 (diff) | |
| download | git-4c36345e04cbef7edb94557119acba9f9a38c26f.tar.xz | |
fast-import: add 'abort-if-invalid' mode to '--signed-commits=<mode>'
The '--signed-commits=<mode>' option for git-fast-import(1) configures
how signed commits are handled when encountered. In cases where an
invalid commit signature is encountered, a user may wish to abort the
operation entirely. Introduce an 'abort-if-invalid' mode to do so.
Signed-off-by: Justin Tobler <jltobler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gpg-interface.c')
| -rw-r--r-- | gpg-interface.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gpg-interface.c b/gpg-interface.c index d517425034..dafd5371fa 100644 --- a/gpg-interface.c +++ b/gpg-interface.c @@ -1164,6 +1164,8 @@ int parse_sign_mode(const char *arg, enum sign_mode *mode, const char **keyid) *mode = SIGN_WARN_STRIP; } else if (!strcmp(arg, "strip")) { *mode = SIGN_STRIP; + } else if (!strcmp(arg, "abort-if-invalid")) { + *mode = SIGN_ABORT_IF_INVALID; } else if (!strcmp(arg, "strip-if-invalid")) { *mode = SIGN_STRIP_IF_INVALID; } else if (!strcmp(arg, "sign-if-invalid")) { |
