Function get_config

Source
pub fn get_config(key: &str) -> Option<String>
Expand description

Gets a value from the users local git configuration, see example

§Arguments

  • key - the config key to look for -> e.g core.editor

§Returns

  • Some(String) with the value if the key is found
  • None on key retrieval failure

§Example

let name = get_config("user.name");