Re: [PATCH v6 03/13] pkt-line: add packet_write_fmt_gently()
- From
Jeff King <peff@peff.net>
- Date
- Aug 26, 2016, 17:23 UTC
- Message-ID
- <20160826172323.t2b56zrwbl7jw5p6@sigill.intra.peff.net>
- In-Reply-To
- <xmqqinunihgl.fsf@gitster.mtv.corp.google.com>
On Fri, Aug 26, 2016 at 10:10:50AM -0700, Junio C Hamano wrote:
Show 17 quoted lines
> Lars Schneider <larsxschneider@gmail.com> 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/20160810150139.lpxyrqkr53s5f4sx@sigill.intra.peff.net/ > > > > ... and I got the impression you agreed with Peff: > > http://public-inbox.org/git/xmqqvaz84g9y.fsf@gitster.mtv.corp.google.com/ > > 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.
Right, what I found difficulty with was factoring out format_packet(). I think the "gently" part is easy.
-Peff