Skip to content

Commit af488c1

Browse files
committed
trust Ctime again
It seems to work now, but let's keep an eye on it.
1 parent fba0a06 commit af488c1

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

gix/src/config/cache/access.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,7 @@ impl Cache {
158158
pub(crate) fn stat_options(&self) -> Result<gix_index::entry::stat::Options, config::stat_options::Error> {
159159
use crate::config::tree::gitoxide;
160160
Ok(gix_index::entry::stat::Options {
161-
trust_ctime: boolean(
162-
self,
163-
"core.trustCTime",
164-
&Core::TRUST_C_TIME,
165-
// For now, on MacOS it's known to not be trust-worthy at least with the Rust STDlib, being 2s off
166-
!cfg!(target_os = "macos"),
167-
)?,
161+
trust_ctime: boolean(self, "core.trustCTime", &Core::TRUST_C_TIME, true)?,
168162
use_nsec: boolean(self, "gitoxide.core.useNsec", &gitoxide::Core::USE_NSEC, false)?,
169163
use_stdev: boolean(self, "gitoxide.core.useStdev", &gitoxide::Core::USE_STDEV, false)?,
170164
check_stat: self

gix/src/config/tree/sections/core.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ impl Core {
4545
/// The `core.symlinks` key.
4646
pub const SYMLINKS: keys::Boolean = keys::Boolean::new_boolean("symlinks", &config::Tree::CORE);
4747
/// The `core.trustCTime` key.
48-
pub const TRUST_C_TIME: keys::Boolean = keys::Boolean::new_boolean("trustCTime", &config::Tree::CORE)
49-
.with_deviation("Currently the default is false, instead of true, as it seems to be 2s off in tests");
48+
pub const TRUST_C_TIME: keys::Boolean = keys::Boolean::new_boolean("trustCTime", &config::Tree::CORE);
5049
/// The `core.worktree` key.
5150
pub const WORKTREE: keys::Any = keys::Any::new("worktree", &config::Tree::CORE)
5251
.with_environment_override("GIT_WORK_TREE")

src/plumbing/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ pub fn main() -> Result<()> {
156156
core::repository::status::Options {
157157
format,
158158
statistics,
159-
thread_limit: thread_limit.or(cfg!(target_os = "macos").then_some(3)), // TODO: make this a configurable when in `gix`, this seems to be optimal on MacOS, linux scales though!
159+
thread_limit: thread_limit.or(cfg!(target_os = "macos").then_some(3)), // TODO: make this a configurable when in `gix`, this seems to be optimal on MacOS, linux scales though! MacOS also scales if reading a lot of files for refresh index
160160
allow_write: !no_write,
161161
submodules: match submodules {
162162
Submodules::All => core::repository::status::Submodules::All,

0 commit comments

Comments
 (0)