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