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);