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

Re: bug/feature request: apply textconv in "git add -p" diff output

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Jun 21, 2009, 12:17 UTC
Message-ID
<fcaeb9bf0906210517s49ed029fr84d31b14b0184bb7@mail.gmail.com>
In-Reply-To
<4A3CAEBB.9030107@drmicha.warpmail.net>

On Sat, Jun 20, 2009 at 7:41 PM, Michael J Gruber<git@drmicha.warpmail.net> wrote:

Show 20 quoted lines
> Nguyen Thai Ngoc Duy venit, vidit, dixit 20.06.2009 09:17:
>> Hi,
>>
>> I use git to manage bdf font files. It it quite cryptic so textconv
>> for diff output makes it much easier to keep track of changes. The
>> only problem is that "git add -p" does not seems to use textconv, so I
>> have to run in parallel "git diff" and "git add -p", then add chunks
>> accordingly. Can somebody add textconv support to "git add -p" please?
>> I'm not so good at Perl to do the job.
>
> I don't think this is possible: textconv filters are meant to produce
> easily readable output from diff, but in no way are they required to be
> injective mappings. So, textconv output cannot to be used in order to
> specify a patch uniquely.
>
> The appropriate approach is to use smudge/clean filters. They are
> mutually inverse. And, in fact, I just checked: add -p uses the cleaned
> version. So, if clean converts to "something textual" which gives you
> readable diffs and meaningful stats (and smudge converts to binary bdf)
> then that is the way to go.

Right, I did not notice because mine was line by line translation. I'll convert it to clean filter. Thanks.

-- 
Duy
Previous: Michael J Gruber
Message 4 of 4 in “bug/feature request: apply textconv in "git add -p" diff output”
  1. Nguyen Thai Ngoc DuyJun 20, 2009
  2. Santi BéjarJun 20, 2009
  3. Michael J GruberJun 20, 2009
  4. Nguyen Thai Ngoc DuyJun 21, 2009

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.