mirror of
https://github.com/git/git.git
synced 2026-03-11 17:39:46 +01:00
The `sign_commit_to_strbuf()` helper in "commit.c" provides fallback logic to get the default configured signing key when a key is not provided and handles generating the commit signature accordingly. This signing operation is not really specific to commits as any arbitrary buffer can be signed. Also, in a subsequent commit, this same logic is reused by git-fast-import(1) when re-signing invalid commit signatures. Move the `sign_commit_to_strbuf()` helper from "commit.c" to "gpg-interface.c" and rename it to `sign_buffer_with_key()`. Also export this function so it can be used by "commit.c" and "builtin/fast-import.c" in the subsequent commit. Signed-off-by: Justin Tobler <jltobler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
52 KiB
52 KiB