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] |
858 | 0 | 0 | 0 | $git->{'_plugin_githooks'}{'hookname'} =~ /^commit-msg|pre-commit$/u and not $git->get_config_boolean("githooks", "abort-commit") |
877 | 0 | 0 | 0 | $limit > 0 and $limit < length $faults |
919 | 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' |
648 | 0 | 3 | $config{'githooks'}{'externals'} //= ["true"] |
649 | 0 | 3 | $config{'githooks'}{'gerrit'}{'enabled'} //= ["true"] |
650 | 0 | 3 | $config{'githooks'}{'abort-commit'} //= ["true"] |
801 | 1 | 0 | $info //= {} |
1035 | 0 | 17 | $git->get_config('i18n', 'commitEncoding') || 'utf-8' |
1076 | 0 | 2 | $git->get_config('i18n', 'commitEncoding') || 'utf-8' |
1096 | 0 | 0 | $git->{'_plugin_githooks'}{'affected_refs'} || {} |
1296 | 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") |
808 | 0 | 1 | 0 | $info->{'prefix'} || caller |
1363 | 0 | 0 | 0 | $cache->{'tmpdir'} //= "Path::Tiny"->tempdir(@args) |