text: public boolean equals(Object other) {if (other instanceof IndexCommit) {IndexCommit otherCommit = (IndexCommit) other;return otherCommit.getDirectory() == getDirectory() && otherCommit.getGeneration() == getGeneration();} else {return false;}}