In our builds we have turned off include_git_properties_file so that we can get better caching / more hermetic builds. However running bazel build //our/spring/boot/stuff/... still always shows a cache miss with the _gengitinfo target, presumably because it's uncacheable.
It would be great if that target did not exist when it's not needed so that our builds could report 100% cache hits.