Step 1: read diff, Step 2: commit