title: How to detect file ends in newline?
body: <p>Over at <a href="https://stackoverflow.com/questions/38664/can-you-modify-text-files-when-committing-to-subversion">Can you modify text files when committing to subversion?</a> <a href="https://stackoverflow.com/questions/38664/can-you-modify-text-files-when-committing-to-subversion#38666">Grant</a> suggested that I block commits instead.</p>
  
  <p>However I don't know how to check a file ends with a newline. How can you detect that the file ends with a newline?</p>