_diffctx/config/git.rs
1use once_cell::sync::Lazy;
2
3/// Initial value of the git subprocess timeout; `git::set_git_timeout`
4/// overwrites it per run from the CLI/MCP `--timeout`.
5pub const DEFAULT_TIMEOUT_SECONDS: u64 = 60;
6pub const CATFILE_TERMINATION_TIMEOUT_SECONDS: u64 = 5;
7
8pub struct GitConfig {
9 pub catfile_termination_timeout_seconds: u64,
10}
11
12impl Default for GitConfig {
13 fn default() -> Self {
14 Self {
15 catfile_termination_timeout_seconds: CATFILE_TERMINATION_TIMEOUT_SECONDS,
16 }
17 }
18}
19
20pub static GIT: Lazy<GitConfig> = Lazy::new(GitConfig::default);