changed the pre-commit hook for old perls
This commit is contained in:
parent
fe6921fbed
commit
63d0c15ef9
@ -343,9 +343,22 @@ sub restrict_changes_in_directory
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $root = $txn->root();
|
my $root = eval { $txn->root() };
|
||||||
my $paths_changed = $root->paths_changed();
|
if (!defined($root))
|
||||||
foreach my $affected_file(keys $paths_changed)
|
{
|
||||||
|
print (STDERR "Cannot open root of transaction - $TRANSACTION\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
my $paths_changed = eval { $root->paths_changed() };
|
||||||
|
if (!defined($paths_changed))
|
||||||
|
{
|
||||||
|
# no change information found. return ok
|
||||||
|
$root->close_root ();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach my $affected_file(keys %$paths_changed)
|
||||||
{
|
{
|
||||||
my $chg = $paths_changed->{$affected_file};
|
my $chg = $paths_changed->{$affected_file};
|
||||||
my $action = $chg->change_kind();
|
my $action = $chg->change_kind();
|
||||||
|
Loading…
Reference in New Issue
Block a user