From: Joel Rosdahl Date: Mon, 2 Dec 2019 20:58:56 +0000 (+0100) Subject: Improve comments related to save_timestamp X-Git-Tag: v4.0~695 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8d51648d0176d6ad6e60398bde924b2e4c24f48a;p=thirdparty%2Fccache.git Improve comments related to save_timestamp (cherry picked from commit 0d0def13a52d7b68376636776e71a9af5bf01bb4) --- diff --git a/src/ccache.cpp b/src/ccache.cpp index 3cda1e4d6..96c3972d3 100644 --- a/src/ccache.cpp +++ b/src/ccache.cpp @@ -1218,6 +1218,8 @@ update_manifest_file(void) auto old_st = Stat::stat(manifest_path); + // See comment in get_file_hash_index for why saving of timestamps is forced + // for precompiled headers. bool save_timestamp = (g_config.sloppiness() & SLOPPY_FILE_STAT_MATCHES) || output_is_precompiled_header; diff --git a/src/manifest.cpp b/src/manifest.cpp index e634d8615..cbfe4f479 100644 --- a/src/manifest.cpp +++ b/src/manifest.cpp @@ -223,10 +223,9 @@ private: // file_stat.ctime() may be 0, so we have to check time_of_compilation // against MAX(mtime, ctime). // - // ccache only reads mtime/ctime if sloppy_file_stat_match is setted, - // so mtimes/ctimes could store as a dummy value (-1) in other scenarios. - // This will effectively control the total number of file infos in - // certain scenarios, such as CI. + // ccache only reads mtime/ctime if file_stat_match sloppiness is enabled, + // so mtimes/ctimes are stored as a dummy value (-1) if not enabled. This + // reduces the number of file_info entries for the common case. auto file_stat = Stat::stat(path, Stat::OnError::log); if (file_stat) {