summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2010-02-15 03:34:24 -0600
committerJesse Luehrs <doy@tozt.net>2010-02-15 03:34:24 -0600
commit84a9458ca2f34d779b8a847a32fb82be058d2403 (patch)
treeb6f4610f98d18306cd3439919d042e8816154620
parentc99d9f552a431e64ba98583d0fcbe8fbc298a2dc (diff)
downloadcrawlbot-84a9458ca2f34d779b8a847a32fb82be058d2403.tar.gz
crawlbot-84a9458ca2f34d779b8a847a32fb82be058d2403.zip
a few more fixes
-rw-r--r--lib/Crawl/Bot/Plugin/Commit.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Crawl/Bot/Plugin/Commit.pm b/lib/Crawl/Bot/Plugin/Commit.pm
index 8e74115..5bb59cd 100644
--- a/lib/Crawl/Bot/Plugin/Commit.pm
+++ b/lib/Crawl/Bot/Plugin/Commit.pm
@@ -69,7 +69,8 @@ sub tick {
for my $rev (@revs) {
my $commit = $commits{$rev};
- $self->say_all("$commit->{author} * r$rev ($commit->{nfiles} changed): $commit->{subject}");
+ my $abbr = substr($rev, 0, 12);
+ $self->say_all("$commit->{author} * r$abbr ($commit->{nfiles} changed): $commit->{subject}");
}
$self->head($branch => $head);
@@ -87,9 +88,9 @@ sub parse_commit {
my ($rev) = @_;
my $dir = pushd($self->checkout);
my $info = `git log -1 --pretty=format:%aN%x00%s%x00%b%x00 $rev`;
- $info =~ /(.*?)\0(.*?)\0(.*?)\0(.*?)/;
+ $info =~ /(.*?)\x00(.*?)\x00(.*?)\x00(.*?)/s;
my ($author, $subject, $body, $stat) = ($1, $2, $3, $4);
- $stat =~ s/(\d+) files changed//;
+ $stat =~ s/(\d+) files changed/$1/;
return {
author => $author,
subject => $subject,