speedup find previous commit