threads / discuss / 30848

Is the textconv filter called for each line ? or once for the file ?

Subject: Is the textconv filter called for each line ? or once for the file ?

## tl;dr

3 messages between Jun 20, 2012 and Jun 20, 2012.

replies: 2people: 3as markdown or json

Laurent Alebarde· Jun 20, 2012, 10:57 UTC · lore
Hi all,
Something I need clarification please :
In the documentation on gitattributes, it is said :

"A textconv, by comparison, is much more limiting. You provide a transformation of the data into a line-oriented text format, and git uses its regular diff tools to generate the output."

Does it mean that the textconv filter is called for each line ? The opposite being called once for the whole file.

Regards,
Laurent.
Matthieu Moy· Jun 20, 2012, 12:17 UTC · re: Laurent Alebarde · lore

Re: Is the textconv filter called for each line ? or once for the file ?

Laurent Alebarde <l.alebarde@free.fr> writes:
Show 11 quoted lines
> Hi all,
>
> Something I need clarification please :
>
> In the documentation on gitattributes, it is said :
>
> "A textconv, by comparison, is much more limiting. You provide a transformation
> of the data into a line-oriented text format, and git uses its regular diff 
> tools to generate the output."
>
> Does it mean that the textconv filter is called for each line ?

No. What would "for each line" mean, since textconv is essentially meant to be called on binary files?

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Junio C Hamano· Jun 20, 2012, 18:35 UTC · re: Matthieu Moy · lore

Re: Is the textconv filter called for each line ? or once for the file ?

Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 16 quoted lines
> Laurent Alebarde <l.alebarde@free.fr> writes:
>
>> Hi all,
>>
>> Something I need clarification please :
>>
>> In the documentation on gitattributes, it is said :
>>
>> "A textconv, by comparison, is much more limiting. You provide a transformation
>> of the data into a line-oriented text format, and git uses its regular diff 
>> tools to generate the output."
>>
>> Does it mean that the textconv filter is called for each line ?
>
> No. What would "for each line" mean, since textconv is essentially meant
> to be called on binary files?

I think the key phrase Laurent has missed is "*into* a line-oriented text format". The input may or may not be line-oriented. The output is expected to be.

← back to recent threads