Re: [PATCH v2 2/3] gpg-interface: introduce sign_buffer_with_key()
- From
Justin Tobler <jltobler@gmail.com>
- Date
- Mar 10, 2026, 18:04 UTC
- Message-ID
- <abBciWOi8D1oRJZ8@denethor>
- In-Reply-To
- <CAP8UFD2F-81dwyOP8iMqQq2MjQ0GN-92ZyACSzbk6f7cOQAmTw@mail.gmail.com>
On 26/03/10 10:01AM, Christian Couder wrote:
Show 10 quoted lines
> On Fri, Mar 6, 2026 at 9:54 PM Justin Tobler <jltobler@gmail.com> 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/
Will fix.
Show 13 quoted lines
> > 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?
That's correct. I'll update the commit message in the next version to try to be a bit more clear here. Thanks.
-Justin