Matt Kraai <kraai@xxxxxxxxx> writes: > I agree that what you suggest is better than the alternatives you > present. Unfortunately, none of them match the current behavior. > Here's the current code: > > if ($val eq 'true') { > return 1; > } elsif ($val eq 'false') { > return 0; > } > > return $_[0]; > > Is there a way to use the form you suggest while falling back to the > default if $val isn't set to 'true' or 'false'? IIRC the return value is actually threestate: 1 for true, 0 for false, and undef for non-bool config value. BTW. git_get_project_config currently emulates old one git-config call per configuration variable, with git-config normalizing boolean values (returning 'true' or 'false'). But it could return Perl truish or Perl falsish instead, as we now use "git config -l -z" + caching config variables, and it is Perl that does normalization of boolean values. -- Jakub Narebski Poland ShadeHawk on #git -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html