diff options
| author | Christian Couder <christian.couder@gmail.com> | 2025-09-17 20:14:27 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-09-17 11:18:28 -0700 |
| commit | eaaddf57912466414bce5bf81a24d1d69caf2e51 (patch) | |
| tree | 3e2a42aaa7d1045088a95a458ee13eae13ef63ab /t/unit-tests/unit-test.c | |
| parent | 2f8fd208c36bf2e88f949d0c4059214dfcb2a717 (diff) | |
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>
Diffstat (limited to 't/unit-tests/unit-test.c')
0 files changed, 0 insertions, 0 deletions
