code: def _lstree(files, dirs):
      
      for f, sha1 in files:
          yield "100644 blob {}\t{}\0".format(sha1, f)
  
      for d, sha1 in dirs:
          yield "040000 tree {}\t{}\0".format(sha1, d)
docs: Make git ls-tree like output.