fix in commit_diff (change to function)