diff options
Diffstat (limited to 'vendor/gix/src/config/tree/sections/gitoxide.rs')
-rw-r--r-- | vendor/gix/src/config/tree/sections/gitoxide.rs | 62 |
1 files changed, 61 insertions, 1 deletions
diff --git a/vendor/gix/src/config/tree/sections/gitoxide.rs b/vendor/gix/src/config/tree/sections/gitoxide.rs index f07d494fb..966d5af7c 100644 --- a/vendor/gix/src/config/tree/sections/gitoxide.rs +++ b/vendor/gix/src/config/tree/sections/gitoxide.rs @@ -24,6 +24,8 @@ impl Gitoxide { pub const SSH: Ssh = Ssh; /// The `gitoxide.user` section. pub const USER: User = User; + /// The `gitoxide.pathspec` section. + pub const PATHSPEC: Pathspec = Pathspec; /// The `gitoxide.userAgent` Key. pub const USER_AGENT: keys::Any = keys::Any::new("userAgent", &config::Tree::GITOXIDE).with_note( @@ -52,6 +54,7 @@ impl Section for Gitoxide { &Self::OBJECTS, &Self::SSH, &Self::USER, + &Self::PATHSPEC, ] } } @@ -86,6 +89,12 @@ mod subsections { .with_deviation( "relative file paths will always be made relative to the git-common-dir, whereas `git` keeps them as is.", ); + + /// The `gitoxide.core.filterProcessDelay` key (default `true`). + /// + /// It controls whether or not long running filter driver processes can use the 'delay' capability. + pub const FILTER_PROCESS_DELAY: keys::Boolean = + keys::Boolean::new_boolean("filterProcessDelay", &Gitoxide::CORE); } impl Section for Core { @@ -99,6 +108,7 @@ mod subsections { &Self::USE_NSEC, &Self::USE_STDEV, &Self::SHALLOW_FILE, + &Self::FILTER_PROCESS_DELAY, ] } @@ -306,6 +316,56 @@ mod subsections { } } + /// The `pathspec` sub-section. + #[derive(Copy, Clone, Default)] + pub struct Pathspec; + + impl Pathspec { + /// The `gitoxide.pathspec.glob` key. + pub const GLOB: keys::Boolean = keys::Boolean::new_boolean("glob", &Gitoxide::PATHSPEC) + .with_environment_override("GIT_GLOB_PATHSPECS") + .with_note("pathspec wildcards don't match the slash character, then needing '**' to get past them"); + /// The `gitoxide.pathspec.noglob` key. + pub const NOGLOB: keys::Boolean = keys::Boolean::new_boolean("noglob", &Gitoxide::PATHSPEC) + .with_environment_override("GIT_NOGLOB_PATHSPECS") + .with_note("Enable literal matching for glob patterns, effectively disabling globbing"); + /// The `gitoxide.pathspec.literal` key. + pub const LITERAL: keys::Boolean = keys::Boolean::new_boolean("literal", &Gitoxide::PATHSPEC) + .with_environment_override("GIT_LITERAL_PATHSPECS") + .with_note("Make the entire spec used verbatim, the only way to get ':()name' verbatim for instance"); + /// The `gitoxide.pathspec.icase` key. + pub const ICASE: keys::Boolean = keys::Boolean::new_boolean("icase", &Gitoxide::PATHSPEC) + .with_environment_override("GIT_ICASE_PATHSPECS") + .with_note("Compare string in a case-insensitive manner"); + /// The `gitoxide.pathspec.inheritIgnoreCase` key, defaulting to `true` if unspecified. + /// If set, pathspecs will automatically be match case-insensitively if the underlying filesystem is configured that way. + pub const INHERIT_IGNORE_CASE: keys::Boolean = + keys::Boolean::new_boolean("inheritIgnoreCase", &Gitoxide::PATHSPEC) + .with_note("Inherit `core.ignoreCase` for defaults in pathspecs"); + /// The default value for `gitoxide.pathspec.inheritIgnoreCase`. + pub const INHERIT_IGNORE_CASE_DEFAULT: bool = true; + } + + impl Section for Pathspec { + fn name(&self) -> &str { + "pathspec" + } + + fn keys(&self) -> &[&dyn Key] { + &[ + &Self::GLOB, + &Self::NOGLOB, + &Self::LITERAL, + &Self::ICASE, + &Self::INHERIT_IGNORE_CASE, + ] + } + + fn parent(&self) -> Option<&dyn Section> { + Some(&Tree::GITOXIDE) + } + } + /// The `objects` sub-section. #[derive(Copy, Clone, Default)] pub struct Objects; @@ -391,7 +451,7 @@ mod subsections { } } } -pub use subsections::{Allow, Author, Commit, Committer, Core, Http, Https, Objects, Ssh, User}; +pub use subsections::{Allow, Author, Commit, Committer, Core, Http, Https, Objects, Pathspec, Ssh, User}; pub mod validate { use std::error::Error; |