Subject: Re: [PATCH v6 03/13] pkt-line: add packet_write_fmt_gently()

From: Junio C Hamano <[email-masked]>
Date: Fri, 26 Aug 2016 10:10:50 -0700

Lars Schneider <[email-masked]> writes:

> I agree with your criticism of the code duplication. 
>
> However, I thought it would be OK, as Peff already 
> tried to refactor it...
> http://public-inbox.org/git/[email-masked]/
>
> ... and I got the impression you agreed with Peff:
> http://public-inbox.org/git/[email-masked]/

The former does not exactly show how ugly it was, but I do not have
to see it.  It is talking about eliminating the need for memcpy()
and duplicated header generation code, which the suggestion you are
responding to didn't even attempt.  If Peff said he tried an even
more aggressive refactoring and it ended up too ugly to live, I
believe him and agree with his assessment.

> I will try to refactor it according to your suggestion above. 
> Would "packet_write_fmt_1()" be an acceptable name or should 
> I come up with something more expressive?

The latter is preferrable, but we do not mind too strongly about
the name of file-scope static helper that will never be called
directly by anybody other than the two more public entry points the
helper was designed to serve.