code: func trackedToBlob(db *gitobj.ObjectDatabase, patterns *tools.OrderedSet) ([]byte, error) {
  	var attrs bytes.Buffer
  
  	for pattern := range patterns.Iter() {
  		fmt.Fprintf(&attrs, "%s\n", pattern)
  	}
  
  	return db.WriteBlob(&gitobj.Blob{
  		Contents: &attrs,
  		Size:     int64(attrs.Len()),
  	})
  }
docs: // trackedToBlob writes and returns the OID of a .gitattributes blob based on
  // the patterns given in the ordered set of patterns, "patterns".