git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 2/2] fast-import: add '--signed-commits=<mode>' option

From
Christian Couder <christian.couder@gmail.com>
Date
Sep 17, 2025, 18:23 UTC
Message-ID
<CAP8UFD3LNnDfc5KDGZUTvbHoMrHxN=m6KjH_c9GbDztpiUNazQ@mail.gmail.com>
In-Reply-To
<aMfw4rboBOemzvr6@pks.im>
On Mon, Sep 15, 2025 at 12:56 PM Patrick Steinhardt <ps@pks.im> wrote:
Show 5 quoted lines
>
> On Mon, Sep 15, 2025 at 12:17:33PM +0200, Christian Couder wrote:
> > On Mon, Sep 15, 2025 at 8:27 AM Patrick Steinhardt <ps@pks.im> wrote:
> > >
> > > On Fri, Sep 12, 2025 at 02:40:42PM +0200, Christian Couder wrote:
Show 13 quoted lines
> > > >
> > > > +             switch (signed_commit_mode) {
> > > > +             case SIGN_ABORT:
> > > > +                     BUG("SIGN_ABORT should be handled before calling parse_one_signature()");
> > > > +                     break;
> > >
> > > Let's be defensive and convert this into a `default:` case so that any
> > > unhandled value will cause a BUG.
> >
> > Ok, maybe something like BUG("invalid signed_commit_mode value %d",
> > signed_commit_mode) then?
>
> Yeah, that should do the job.

In the V3 I just sent, I have changed the switch (...) { ... } but there is a `default: ...` case with the BUG() instruction we discussed. Hopefully it still does the job.

Thanks.
Previous: Patrick SteinhardtNext: Christian Couder
Message 8 of 11 in “fast-import: start controlling how commit signatures are handled”
  1. 0/2 fast-import: start controlling how commit signatures are handledChristian Couder, Sep 12, 2025
  2. 1/2 gpg-interface: refactor 'enum sign_mode' parsingChristian Couder, Sep 12, 2025
  3. 2/2 fast-import: add '--signed-commits=<mode>' optionChristian Couder, Sep 12, 2025
  4. Christian CouderSep 12, 2025
  5. Patrick SteinhardtSep 15, 2025
  6. Christian CouderSep 15, 2025
  7. Patrick SteinhardtSep 15, 2025
  8. Christian CouderSep 17, 2025
  9. 0/2 fast-import: start controlling how commit signatures are handledChristian Couder, Sep 17, 2025
  10. 1/2 gpg-interface: refactor 'enum sign_mode' parsingChristian Couder, Sep 17, 2025
  11. 2/2 fast-import: add '--signed-commits=<mode>' optionChristian Couder, Sep 17, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.