[ANN] draft of pre_commit hook to check that committed files does not contains CRLF line-endings
Eugene Wee
eugenew at starhub.net.sg
Fri Mar 7 21:20:39 GMT 2008
Hi,
Thanks! It certainly looks good :)
If I should be so bold as to make some feature requests...
1. Instead of just checking for CRLF line endings, could it be easily
changed such that one can check for line endings that are *not* CRLF? I
have in mind (primarily) Windows based development teams that want to
keep their line endings in normal Windows format.
2. Along more radical lines, could this plugin (or another written along
the same lines) not only check, but also convert line endings if so
configured? This would still not necessarily be a complete solution, but
it might be the next step towards one, and perhaps it would be a stop
gap solution for some teams.
Thanks,
Eugene Wee
Alexander Belchenko wrote:
> Recently there was request for such hook. I'm also needed it for my new
> co-worker who switch between Windows and Linux very often and tends
> to commit files with wrong EOL. So here is the result of my attempt.
> Consider it alpha, any feedback is welcome!
>
> http://bazaar.launchpad.net/~bialix/+junk/checkeol
>
> To enable check EOL you need to get copy of my plugin first and then
> create file .checkeol in the root of your tree with the set of file
> patterns that should be checked before commit succeeded. Format
> of .checkeol is the same as for .bzrignore file.
>
> Enjoy and say me what you think.
>
>
More information about the bazaar
mailing list