Add the ability to always build from the repo's HEAD

This is a hack to make sure 'git fetch' inside an existing repository
still gets its HEAD tracking remote's HEAD.