git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] diff: clarify textconv interface

From
Duy Nguyen <pclouds@gmail.com>
Date
Feb 22, 2016, 23:01 UTC
Message-ID
<CACsJy8Cg4cgCEqwo=9ujdTV8aw5CO-irVxOCanzBG4n7Nm-0kg@mail.gmail.com>
In-Reply-To
<20160222182854.GA11732@sigill.intra.peff.net>
On Tue, Feb 23, 2016 at 1:28 AM, Jeff King <peff@peff.net> wrote:
Show 14 quoted lines
> On Mon, Feb 22, 2016 at 01:06:45PM -0500, Jeff King wrote:
>
>> I have a feeling you were confused by the fact that fill_textconv()
>> does:
>
> Looking over it, I agree this is a pretty confusing interface that grew
> out of control over time.  But refactoring it is kind of tricky, because
> we really do want to avoid extra allocations, or cross-module
> assumptions (e.g., userdiff doesn't know about diff_filespec, but rather
> the other way around, and we probably do not want to muck with the
> internals of a diff_filespec when doing a textconv).
>
> So I think the patch below is an improvement, but if somebody really
> wants to dig into refactoring it, be my guest.

I almost went this way but I wasn't sure if driver->textconv can be NULL on purpose. Definitely an improvement.

-- 
Duy
Previous: Jeff King
Message 10 of 10 in “diff.c: remove unnecessary typecast”
  1. 2/3 diff.c: remove unnecessary typecastNguyễn Thái Ngọc Duy, Feb 22, 2016
  2. 3/3 Correct conditions to free textconv result dataNguyễn Thái Ngọc Duy, Feb 22, 2016
  3. Duy NguyenFeb 22, 2016
  4. Jeff KingFeb 22, 2016
  5. Jeff KingFeb 22, 2016
  6. Duy NguyenFeb 22, 2016
  7. Junio C HamanoFeb 22, 2016
  8. Jeff KingFeb 22, 2016
  9. diff: clarify textconv interfaceJeff King, Feb 22, 2016
  10. Duy NguyenFeb 22, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.