use either vc or repository-root to deduce a file's repository root