About `opam --git-version`, this should be done properly on all build paths, and we get it by manually checking the files under .git without resorting to the git program. So I guess brew builds from an archive, in which case I don't see what we could do.