rev-parse: take prefix into account in --git-common-dir