It's actually quite proper for a source code file to have a single blank line at the end. It's to prevent the file from having a line that does not end in a newline. However, the default commit hook doesn't check to see if a blank line at the end is the only one or not. Reproducible: Always
Just took a look at the file "the hard way" by using mcedit in a console. The file is properly terminated by a newline, but gedit doesn't show that. New bug is being filed against gedit.