changed the pre-commit hook for old perls
This commit is contained in:
		| @ -343,9 +343,22 @@ sub restrict_changes_in_directory | ||||
| 		return -1; | ||||
| 	} | ||||
|  | ||||
| 	my $root = $txn->root(); | ||||
| 	my $paths_changed = $root->paths_changed(); | ||||
| 	foreach my $affected_file(keys $paths_changed) | ||||
| 	my $root = eval { $txn->root() }; | ||||
| 	if (!defined($root)) | ||||
| 	{ | ||||
| 		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 $action = $chg->change_kind(); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user