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

3 messages from 2012-06-20 to 2012-06-20. Participants: Laurent Alebarde, Matthieu Moy, Junio C Hamano.
Thread: https://gitlist.dev/t/30848

## Laurent Alebarde, 2012-06-20 10:57

Subject: Is the textconv filter called for each line ? or once for the file ?
Message-ID: <loom.20120620T125636-763@post.gmane.org>
URL: https://gitlist.dev/e/loom.20120620T125636-763%40post.gmane.org

```
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, 2012-06-20 12:17

Subject: Re: Is the textconv filter called for each line ? or once for the file ?
Message-ID: <vpqy5nidvnx.fsf@bauges.imag.fr>
URL: https://gitlist.dev/e/vpqy5nidvnx.fsf%40bauges.imag.fr
In-Reply-To: <loom.20120620T125636-763@post.gmane.org>

```
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?

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

```

## Junio C Hamano, 2012-06-20 18:35

Subject: Re: Is the textconv filter called for each line ? or once for the file ?
Message-ID: <7vtxy5vnk3.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vtxy5vnk3.fsf%40alter.siamese.dyndns.org
In-Reply-To: <vpqy5nidvnx.fsf@bauges.imag.fr>

```
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:

> 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.

```
