aboutsummaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-12-05 14:49:58 +0900
committerJunio C Hamano <gitster@pobox.com>2025-12-05 14:49:58 +0900
commit1b40ddc1a5e2eecd54802c3c6c3c940b0306542a (patch)
treece1c454b13334bc0c46be46b37169a8ccc1ebf91 /commit.h
parent85f99338e107a36650257787a350821acc36a81d (diff)
parentc20f112e5149d1bd0d4741c4b28a65f81318309a (diff)
downloadgit-1b40ddc1a5e2eecd54802c3c6c3c940b0306542a.tar.xz
Merge branch 'cc/fast-import-strip-if-invalid'
"git fast-import" learns "--strip-if-invalid" option to drop invalid cryptographic signature from objects. * cc/fast-import-strip-if-invalid: fast-import: add 'strip-if-invalid' mode to --signed-commits=<mode> commit: refactor verify_commit_buffer() fast-import: refactor finalize_commit_buffer()
Diffstat (limited to 'commit.h')
-rw-r--r--commit.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/commit.h b/commit.h
index 1d6e0c7518..5406dd2663 100644
--- a/commit.h
+++ b/commit.h
@@ -333,6 +333,13 @@ int remove_signature(struct strbuf *buf);
*/
int check_commit_signature(const struct commit *commit, struct signature_check *sigc);
+/*
+ * Same as check_commit_signature() but accepts a commit buffer and
+ * its size, instead of a `struct commit *`.
+ */
+int verify_commit_buffer(const char *buffer, size_t size,
+ struct signature_check *sigc);
+
/* record author-date for each commit object */
struct author_date_slab;
void record_author_date(struct author_date_slab *author_date,