Re: [PATCH 1/1] gpg-interface: limit search for primary key fingerprint
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 22, 2019, 02:39 UTC
- Message-ID
- <xmqqsgmg7hyf.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <87d0dkbyxb.hji@dyntopia.com>
Hans Jerry Illikainen <hji@dyntopia.com> writes:
Show 19 quoted lines
> On Mon, Nov 18 2019, Junio C Hamano wrote:
> ...
>> A short helper
>>
>> static void replace_cstring(const char **field,
>> const char *line, const char *next)
>> {
>> free(*field);
>> if (line && next)
>> *field = xmemdupz(line, next - line);
>> else
>> *field = NULL;
>> }
>>
>> may have quite a lot of uses in this function, not only for this
>> field.
>
> Implemented. I wasn't sure whether to do it in a separate commit or
> not, but #git-devel suggested that I do; so that's what I did.If such a refactoring helped the readability of _existing_ code that can also use this helper, then I agree it is the right approach to make that into a separate prelimimary commit.
Thanks for working on this.