Skip to content

Commit

Permalink
Differentiate between Executable and Program
Browse files Browse the repository at this point in the history
It's somewhat confusing, but it seems sometimes `git` uses a shell, but other
times it doesn't. And that is differentiate by the type system.

It would still have to be (re)validated at some point if this is actually the case,
but I guess there was a reason for this in the first place.
  • Loading branch information
Byron committed Dec 12, 2023
1 parent ff71e07 commit 56d1d09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions gix/src/config/tree/sections/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ impl Core {
pub const DISAMBIGUATE: Disambiguate =
Disambiguate::new_with_validate("disambiguate", &config::Tree::CORE, validate::Disambiguate);
/// The `core.editor` key.
pub const EDITOR: keys::Executable = keys::Executable::new_executable("editor", &config::Tree::CORE);
pub const EDITOR: keys::Program = keys::Program::new_program("editor", &config::Tree::CORE);
/// The `core.fileMode` key.
pub const FILE_MODE: keys::Boolean = keys::Boolean::new_boolean("fileMode", &config::Tree::CORE);
/// The `core.ignoreCase` key.
Expand Down Expand Up @@ -60,10 +60,10 @@ impl Core {
.with_environment_override("GIT_ASKPASS")
.with_note("fallback is 'SSH_ASKPASS'");
/// The `core.excludesFile` key.
pub const EXCLUDES_FILE: keys::Executable = keys::Executable::new_executable("excludesFile", &config::Tree::CORE);
pub const EXCLUDES_FILE: keys::Path = keys::Path::new_path("excludesFile", &config::Tree::CORE);
/// The `core.attributesFile` key.
pub const ATTRIBUTES_FILE: keys::Executable =
keys::Executable::new_executable("attributesFile", &config::Tree::CORE)
pub const ATTRIBUTES_FILE: keys::Path =
keys::Path::new_path("attributesFile", &config::Tree::CORE)
.with_deviation("for checkout - it's already queried but needs building of attributes group, and of course support during checkout");
/// The `core.sshCommand` key.
pub const SSH_COMMAND: keys::Executable = keys::Executable::new_executable("sshCommand", &config::Tree::CORE)
Expand Down
4 changes: 2 additions & 2 deletions gix/src/config/tree/sections/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ impl Diff {
pub const RENAMES: Renames = Renames::new_renames("renames", &config::Tree::DIFF);

/// The `diff.<driver>.command` key.
pub const DRIVER_COMMAND: keys::String = keys::String::new_string("command", &config::Tree::DIFF)
pub const DRIVER_COMMAND: keys::Program = keys::Program::new_program("command", &config::Tree::DIFF)
.with_subsection_requirement(Some(SubSectionRequirement::Parameter("driver")));
/// The `diff.<driver>.textconv` key.
pub const DRIVER_TEXTCONV: keys::String = keys::String::new_string("textconv", &config::Tree::DIFF)
pub const DRIVER_TEXTCONV: keys::Program = keys::Program::new_program("textconv", &config::Tree::DIFF)
.with_subsection_requirement(Some(SubSectionRequirement::Parameter("driver")));
/// The `diff.<driver>.algorithm` key.
pub const DRIVER_ALGORITHM: Algorithm =
Expand Down

0 comments on commit 56d1d09

Please sign in to comment.