The search_commits method was only very lightly tested, meaning over half of it was not covered. Write another test case, covering all code paths.