t / t4101 / diff.1-2on 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-b
   6-c
   7+b
   8\ No newline at end of file