Skip to content

Commit 1df1ebb

Browse files
committed
feat: Enable precious file parsing in gix CLI by default, allow overrides.
That's pretty neat as one can now set `GIX_PARSE_PRECIOUS=0` in the environment to disable precious file parsing, good to see what difference it makes. It's also possible to do this wiht `gix -c gitoxide.parsePrecious=0`.
1 parent 4ef7806 commit 1df1ebb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/plumbing/main.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,16 @@ pub fn main() -> Result<()> {
118118
.append_config(config.iter(), gix::config::Source::Cli)
119119
.context("Unable to parse command-line configuration")?;
120120
}
121+
{
122+
let mut config_mut = repo.config_snapshot_mut();
123+
// Enable precious file parsing unless the user made a choice.
124+
if config_mut
125+
.boolean(gix::config::tree::Gitoxide::PARSE_PRECIOUS)
126+
.is_none()
127+
{
128+
config_mut.set_raw_value(&gix::config::tree::Gitoxide::PARSE_PRECIOUS, "true")?;
129+
}
130+
}
121131
Ok(repo)
122132
}
123133
};

0 commit comments

Comments
 (0)