ssoma-mda: Use the email subject as the commit message
[ssoma-mda.git] / lib / Ssoma / Git.pm
index 22118932c8043c99038dfa085359069a430fe4b8..e8d4cf625c4c91789a4877cf63acbc9bfc7b3bad 100644 (file)
@@ -266,10 +266,9 @@ sub commit_index {
        my @cmd = qw/git commit-tree/;
        push @cmd, $tree;
        push @cmd, '-p', $parent if $parent;
+       push @cmd, '-m', "'$message'";
 
-       # git commit-tree -m didn't work in older git versions
-       $message =~ /\A\w+\z/ or die "message must be \\w+ only\n";
-       my $commit = $self->qx_sha1("echo $message |". join(' ', @cmd));
+       my $commit = $self->qx_sha1(join(' ', @cmd));
 
        # update the ref
        @cmd = (qw/git update-ref/, $ref, $commit);