To be fair, you could argue that your mentioned behaviour is an undesirable feature of current revision control software and code editors. The formatting could be declarative, so that compiler-meaningless indentation is not on disk. And, compiler-meaningless changes could be ignored by revision control (that's probably provided if meaningless changes aren't persisted to disk in the first place).
This implies an amount of language-understanding from the revision control system I'd rather avoid, especially when I unfortunately spend so much of my life writing mixed source-in-source-in-source monstrosities these days.