Thread (11 messages) 11 messages, 2 authors, 2025-09-17

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

From: Christian Couder <hidden>
Date: 2025-09-17 18:24:00

On Mon, Sep 15, 2025 at 12:56 PM Patrick Steinhardt [off-list ref] wrote:
On Mon, Sep 15, 2025 at 12:17:33PM +0200, Christian Couder wrote:
quoted
On Mon, Sep 15, 2025 at 8:27 AM Patrick Steinhardt [off-list ref] wrote:
quoted
On Fri, Sep 12, 2025 at 02:40:42PM +0200, Christian Couder wrote:
quoted
quoted
quoted
+             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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help