Extract refspecs for git