convert unmerge_cache to take struct pathspec