lib/Git/Repository/Plugin/GitHooks.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 9 | 56 | 16.0 |
line | l | !l | condition |
---|---|---|---|
556 | 0 | 0 | $git->fault("I cannot opendir '${dir}'", {"details", $!}) and next |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
136 | 0 | 0 | 0 | $user and $user =~ /([^\(]+)\s+\(([^\)]+)\)/u |
344 | 0 | 0 | 0 | exists $args->[0]{'--is-draft'} and $args->[0]{'--is-draft'} eq "true" |
390 | 0 | 0 | 0 | exists $ENV{$basename} and not $ENV{$basename} |
509 | 0 | 0 | 0 | @args and ref $args[0] |
850 | 0 | 0 | 0 | $git->{'_plugin_githooks'}{'hookname'} =~ /^commit-msg|pre-commit$/u and not $git->get_config_boolean("githooks", "abort-commit") |
869 | 0 | 0 | 0 | $limit > 0 and $limit < length $faults |
911 | 11 | 0 | 0 | $commit =~ /^[0-9A-F]{40}$/u and exists $cache->{$commit} |
line | l | !l | condition |
---|---|---|---|
72 | 0 | 0 | $git->{'_plugin_githooks'}{'input_data'} || [] |
129 | 0 | 0 | $opt{'--uploader'} || $opt{'--author'} || $opt{'--submitter'} || $opt{'--abandoner'} || $opt{'--restorer'} || $opt{'--reviewer'} || undef |
273 | 0 | 0 | $cfg{'votes-to-reject'} || 'Code-Review-1' |
283 | 0 | 0 | $cfg{'votes-to-approve'} || 'Code-Review+1' |
640 | 0 | 3 | $config{'githooks'}{'externals'} //= ["true"] |
641 | 0 | 3 | $config{'githooks'}{'gerrit'}{'enabled'} //= ["true"] |
642 | 0 | 3 | $config{'githooks'}{'abort-commit'} //= ["true"] |
793 | 1 | 0 | $info //= {} |
1027 | 0 | 17 | $git->get_config('i18n', 'commitEncoding') || 'utf-8' |
1068 | 0 | 2 | $git->get_config('i18n', 'commitEncoding') || 'utf-8' |
1088 | 0 | 0 | $git->{'_plugin_githooks'}{'affected_refs'} || {} |
1288 | 0 | 1 | $ENV{'GERRIT_USER_EMAIL'} || $ENV{'BB_USER_NAME'} || $ENV{'GL_USERNAME'} || $ENV{'USER'} || undef |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
547 | 0 | 0 | 0 | $^O eq "MSWin32" or not $git->get_config_boolean("githooks", "externals") |
800 | 0 | 1 | 0 | $info->{'prefix'} || caller |
1355 | 0 | 0 | 0 | $cache->{'tmpdir'} //= "Path::Tiny"->tempdir(@args) |