From: Junio C Hamano Date: Fri, 22 Nov 2019 02:39:20 GMT Subject: Re: [PATCH 1/1] gpg-interface: limit search for primary key fingerprint Message-ID: In-Reply-To: <87d0dkbyxb.hji@dyntopia.com> Hans Jerry Illikainen writes: > 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.