text: public override bool Equals(object other){if (other is IndexCommit){IndexCommit otherCommit = (IndexCommit)other;return otherCommit.Directory == Directory && otherCommit.Generation == Generation;}else{return false;}}