Compact a diff content and create a diff at first save