Harald Nordgren's patch says that since 8d3a673147, which precompiles git-compat-util.h, rebuilding Git with ccache is almost as slow as building without it. ccache refuses to cache compilations that use a precompiled header unless its "pch_defines" and "time_macros" sloppiness settings are enabled, so the compiler runs for nearly every object file.

Nordgren argues both settings are safe for Git's build. The precompiled header is pulled in with "-include" ahead of the source file, so no "#define" in a source file can precede it, and none of the sources use __DATE__, __TIME__ or __TIMESTAMP__. The patch enables them for the Makefile build.

Patrick Steinhardt said Meson auto-detects ccache, so this kind of setting should be handled in Meson itself. He pointed to an upstream Meson issue as the right direction, but said he would not object if someone documented it in Git's instructions in the meantime. Nordgren replied that he would leave Meson out and might look at opening a pull request there instead.