diff --git a/src/lib.rs b/src/lib.rs index e182870c6c..88f19a6aea 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -959,7 +959,7 @@ impl fmt::Display for ReferenceType { impl ConfigLevel { /// Converts a raw configuration level to a ConfigLevel pub fn from_raw(raw: raw::git_config_level_t) -> ConfigLevel { - match raw { + match raw >> 12 { // TODO: why!? raw::GIT_CONFIG_LEVEL_PROGRAMDATA => ConfigLevel::ProgramData, raw::GIT_CONFIG_LEVEL_SYSTEM => ConfigLevel::System, raw::GIT_CONFIG_LEVEL_XDG => ConfigLevel::XDG,