mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
fast-import: add '--signed-commits=<mode>' option
A '--signed-commits=<mode>' option is already available when using `git fast-export` to decide what should be done at export time about commit signatures. At import time though, there is no option, or other way, in `git fast-import` to decide about commit signatures. To remediate that, let's add a '--signed-commits=<mode>' option to `git fast-import` too. For now the supported <mode>s are the same as those supported by `git fast-export`. The code responsible for consuming a signature is refactored into the import_one_signature() and discard_one_signature() functions, which makes it easier to follow the logic and add new modes in the future. In the 'strip' and 'warn-strip' modes, we deliberately use discard_one_signature() to discard the signature without parsing it. This ensures that even malformed signatures, which would cause the parser to fail, can be successfully stripped from a commit. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
2f8fd208c3
commit
eaaddf5791
@@ -66,6 +66,11 @@ OPTIONS
|
||||
remote-helpers that use the `import` capability, as they are
|
||||
already trusted to run their own code.
|
||||
|
||||
--signed-commits=(verbatim|warn-verbatim|warn-strip|strip|abort)::
|
||||
Specify how to handle signed commits. Behaves in the same way
|
||||
as the same option in linkgit:git-fast-export[1], except that
|
||||
default is 'verbatim' (instead of 'abort').
|
||||
|
||||
Options for Frontends
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Reference in New Issue
Block a user