From: Christian Couder Date: Mon, 15 Sep 2025 10:29:28 GMT Subject: Re: [PATCH 2/2] fast-import: add '--signed-commits=' option Message-ID: In-Reply-To: On Fri, Sep 12, 2025 at 4:14 PM Junio C Hamano wrote: > > Christian Couder writes: > > >> ... Was it so important that we pass a > >> broken signature without inspecting in STRIP mode? I am guessing > >> that is the reason why the new code tries hard to avoid calling the > >> parse_one_signature() function in these case arms. > > > > Yeah, I thought it was cleaner and a bit faster if we don't parse > > signatures when in STRIP mode. That's why I did it like this. > > I do not think parsing performance matters all that much here, but I > think it is a good idea to recover from malformed signature lines if > the parsing code can detect some. It is likely that the user may be > using STRIP hoping that they can skip bad or unknown signature data > in the incoming stream, so it is beneficial to be lenient there. Yeah, parse_one_signature() expects a signature to be in the 'gpgsig ' and might die() in case it cannot validate or . So it seems to me that I should change the code back so that its behavior is the same as in v1, while trying to avoid what you called code ergonomics regression when you reviewed v1. Ok, let's see if I find a way to do that. Thanks.