diff stats to buf and diff format email