fix and speedup for GitRemoteResolver.js