2013/3/3 Alexandre Ferrieux <[email protected]>:
> On Wed, Feb 27, 2013 at 1:43 PM, Jan Nijtmans
> <[email protected]> wrote:
>> 2013/2/27 Porter, Don <[email protected]>:
>>>
>>> Why is fossil at core.tcl.tk treating the file regexp.test
>>> as a binary file? How can we make it stop?
>>>
>>> Inability to do diffs to see the modifications is not a
>>> good thing.
>>
>> The reason is that line 828 of regexp.test is too long. It should be
>> wrapped in multiple lines. But that's not trivial.....
>
> Oh please let's not put constraints on the code due to a specific
> tool's shortcomings, even if it's such a venerable one as Fossil.
> Let's fix Fossil instead.
> Any detail on the line-length criterion to decide that a file is
> binary ? Is it a disposable "convenience" thing, or a structural one
> (to avoid a nasty worst-case scenario in the diff algorithm) ? I know
> it is open source, and will happily do the diving, unless you have
> already done so ;)
>
> -Alex
Yes, I already dug in it a little, some time ago. At least fossil should
give a warning when an apparent text file is handled as binary just
because of containing long lines (>8192 chars). Committed that
now in the fossil code.
See fossil's src/diff.c, starting with line 65
/*
** Maximum length of a line in a text file, in bytes. (2**13 = 8192 bytes)
*/
#define LENGTH_MASK_SZ 13
#define LENGTH_MASK ((1<<LENGTH_MASK_SZ)-1)
I don't think it's easy to extend fossil to allow diffs > 8192 chars, and
it is not really necessary: people can always configure an external diff
tool which does not have this limitation.
Regards,
Jan Nijtmans
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users