Petr Baudis [off-list ref] writes:
This patch renames config_boolean() to config_bool() for consistency with
the commandline interface and because it is shorter but still obvious. ;-)
It also changes the return value from some obscure string to real Perl
boolean, allowing for clean user code.
Doesn't this break send-email?
quoted hunk
@@ -526,14 +528,16 @@ This currently wraps command('config') s
=cut
-sub config_boolean {
+sub config_bool {
my ($self, $var) = @_;
$self->repo_path()
or throw Error::Simple("not a repository");
try {
- return $self->command_oneline('config', '--bool', '--get',
+ my $var = $self->command_oneline('config', '--bool', '--get',
$var);
+ return undef unless defined $var;
+ return $var eq 'true';
Did you mean to hide $var in the nested scope?