[darcs-users] Line endings

Juliusz Chroboczek Juliusz.Chroboczek at pps.jussieu.fr
Sun Jul 13 14:26:09 UTC 2008


> I know that there are pre-hooks and post-hooks, which can be used to
> translate line endings, so that the repository always contains '\n',
> while the working copy of windows users will have '\r\n'. The problem
> is that there is no standard way of doing this on windows.

> Of course, one could require users to install dos2unix and unix2dos or
> something similar, but that seems to me ridiculous.

What's so ridiculous about it?  (A more radical solution would be to
require your users to install Linux, of course.)

Wild idea: what about adding ``darcs dos2unix'' and ``darcs unix2dos''
(or, perhaps, ``darcs convert --to-unix'' and ``--to-dos'') so that
people can put that into their hooks without installing anything else?

Miklos Vajna:

> Probably having a file like _darcs/prefs/boring to declare the file
> patterns which should be converted on checkout/checkin would be a good
> idea.

Please don't.  Automagical conversion is confusing in the long term.

                                        Juliusz


More information about the darcs-users mailing list