From: Christian Couder Date: Tue, 10 Mar 2026 09:01:27 GMT Subject: Re: [PATCH v2 2/3] gpg-interface: introduce sign_buffer_with_key() Message-ID: In-Reply-To: <20260306205359.1723254-3-jltobler@gmail.com> On Fri, Mar 6, 2026 at 9:54 PM Justin Tobler wrote: > > 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 resigning invalid commit signatures. Nit: s/resigning/re-signing/ > Introduce `sign_buffer_with_key()` to centralize signing key resolution > in gpg-interface to allow callers to reuse the same behavior without > duplicating logic. Nit: I think it would be a bit clearer if the change was described as: - moving the `sign_commit_to_strbuf()` helper from "commit.c" to "gpg-interface.c", - renaming it to `sign_buffer_with_key()`, and - exporting it (so it can later be used by both "commit.c" and "builtin/fast-import.c"). Or did I miss something?