t / t4101 / diff.2-3on commit use strbuf_add_unique_abbrev() for adding short hashes (1eb47f1)
   1--- a/frotz
   2+++ b/frotz
   3@@ -1,2 +1,3 @@
   4 a
   5+c
   6 b
   7\ No newline at end of file