diff options
| author | Justin Tobler <jltobler@gmail.com> | 2026-03-12 20:39:37 -0500 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-12 21:28:20 -0700 |
| commit | 86ebf870b909a7f4707aa2601d290bc992d21a53 (patch) | |
| tree | 9056a0624020917e9eb4c88020cf11a8fe479121 /commit.h | |
| parent | 233545cc60315863fea3fa17e2df86de23a6a4f7 (diff) | |
| download | git-86ebf870b909a7f4707aa2601d290bc992d21a53.tar.xz | |
gpg-interface: allow sign_buffer() to use default signing key
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 signing commits with invalid
signatures.
Remove the `sign_commit_to_strbuf()` helper from "commit.c" and extend
`sign_buffer()` in "gpg-interface.c" to support using the default key as
a fallback when the `SIGN_BUFFER_USE_DEFAULT_KEY` flag is provided. Call
sites are updated accordingly.
Signed-off-by: Justin Tobler <jltobler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
0 files changed, 0 insertions, 0 deletions
