diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 18:31:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 18:31:44 +0000 |
commit | c23a457e72abe608715ac76f076f47dc42af07a5 (patch) | |
tree | 2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /vendor/gix/src/config/tree/sections/gitoxide.rs | |
parent | Releasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip |
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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; |