[PATCH 0/2] commit -t appends newline after template file
From: Patryk Obara <hidden>
Date: 2016-06-15 23:04:55
These are my first patches to git, so be extra pedantic during review, please. I noticed, that newline is appended, when I try to use template file - which is annoying if template ends with comment. I digged a bit and it turned out that: * my editor (vim) was appending newline before eof in template, (I forgot about this); most editors, that I tested appends newline before eof by default. Emacs was exception here. * commit --status appends newline unconditionally before placing first comment line - it needs to do this or comment might be appended to last line of template file. Usually, in result two newlines are appended after template file content - and unexpected empty line appears in editor. * tests for git-commit do not verify newlines at all I fixed tests and wrote few more (patch 1/2) - after applying this patch some tests won't pass (they shouldn't be passing in the first place imo). Patch 2 fixes all broken tests. More detailed description is in mails to follow.