Removed unnecessary duplicate of CommitMismatchError from search.py and added test for the fix.