Line endings

Simon Peyton-Jones simonpj at microsoft.com
Thu May 12 09:45:18 CEST 2011


Does anyone know an easy way to list files that use windows line-endings?

All our GHC source trees are supposed to use Unix line endings, and we set Git's autrcrlf to 'false'; but it's all too easy to accientally commit a windows file.  I want a command that says

line-endings <filename>
and have it output
    <filename>: windows
or
  <filename>:unix

Of course I want to run it on a long list of filenames
                find . -name '*hs' | xargs line-endings

Thanks

Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/cvs-ghc/attachments/20110512/1cc37838/attachment.htm>


More information about the Cvs-ghc mailing list