revbank/plugins/revspace_git
2025-04-10 23:18:41 +02:00

12 lines
313 B
Perl

#!perl
sub hook_account_balance($class, $account, $old, $delta, $new, $transaction_id, @) {
my $msg = "$transaction_id ($account)";
$msg =~ s/[^\x20-\x7E]//g;
$msg =~ s/'//g;
system("(git commit -am '$msg') > /dev/null 2>&1")
== 0 or warn "Meh, gitfaal";
system("git gc --auto");
}