fix bug in getCommitDifference