t / t4101 / diff.2-1on commit use strbuf_complete_line() for adding a newline if needed (a0d4923)
   1--- a/frotz
   2+++ b/frotz
   3@@ -1,2 +1,3 @@
   4 a
   5-b
   6\ No newline at end of file
   7+b
   8+c