convert refresh_index to take struct pathspec