made Commit immutable
extracted common assertEqualCommits()