[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: extending the blame callback

From: Stefan Kueng <tortoisesvn_at_gmail.com>
Date: Sat, 5 Jan 2019 19:56:22 +0100

On 05.01.2019 17:53, Julian Foad wrote:
> Stefan Kueng wrote:
>> When running blame on an utf16 text file, the lines can not be used
>> since the blame callback only passes a 'char *' parameter which means it
>> ends at the first zero char. But actually, svn knows if the line has
>> more content.
>
> +1 on doing something to fix the problem.
>
> Just briefly:
> * we already have a (char*, len) wrapper, called svn_string_t, so I would expect it would be neatest to use that;

Ok, I'll change that and send a new patch.

> * splitting the lines on a bare LF byte, and having a left-over zero byte, sounds just so wrong... it can't be right, can it? Can't we do something better? Use a callback for deciding how to split lines, or something? I haven't looked at the code, so not sure what exactly.

Well, without doing several checks for what kind of encoding the line
has this won't be possible. I'm just glad that the function as is does
not stop at the zero char but only on 'lf' - so even if the file is
really binary it "works".

Stefan
Received on 2019-01-05 19:56:36 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.