Yury Polyanskiy <[EMAIL PROTECTED]> writes:

> I think there is a bug in CRLF<->LF conversions or at least unintended
> behavior.
>
> Suppose the following scenario.
>
> function get_linesep_conv(fname)
>               return {"LF", "CRLF"}
> end
>
> I expect to have all files translated from LF to CRLF after checkout
> with this hook. Indeed that happens. However, suppose I have a binary
> file which is (in case of such a dumb hook) fed through line translation
> procedure. Then each occurence of 0x0a *OR* 0x0d is replaced by two
> bytes [0x0d 0x0a]. 
>
> Now if I try to commit the translation procedure is applied backwards.
> But now all occurences of [0x0d 0x0a] are replaced by 0x0a. 
>
> Overall I got all 0x0d's translated into 0x0a's. And this will be
> committed to database and eventually ruin everyone else's binaries as
> well.

My first thought is that monotone shouldn't be using this hook at all
for binary files, should it?

[...]



_______________________________________________
Monotone-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to