Function git_nomad::resolve

source ·
pub(crate) fn resolve<T: Clone + From<String>>(
    matches: &mut ArgMatches,
    arg_name: &str,
    from_git_config: impl FnOnce() -> Result<Option<T>>
) -> Result<T>
Expand description

Extract user arguments in order of preference:

  1. Passed in as direct CLI options
  2. Specified as an environment variable
  3. Specified in git config
  4. A default from querying the operating system