Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 35 lines (29 sloc) 0.899 kb
#!/usr/bin/perl
use Time::Local;
my $when = do {
my @date = localtime;
@date = localtime(time() - 86400) if $date[2] < 9;
@date[2,1,0] = (9, 0, 0);
timelocal(@date);
};
my $logs = "";
my $GITDIR = shift() || "$ENV{HOME}/src";
for my $repo (qw(pm moonpig pobox)) {
my $dir = "$GITDIR/$repo";
chdir $dir or die "chdir $dir: $!";
system("git fetch origin");
my @commitids =
map { $_->[1] }
grep { $_->[0] >= $when }
map { [ split ] } qx{git log --reverse --since=9AM --all --format="%at %H" --author=mjd gitbox/master origin/master};
$logs .= qx{git log -w -n1 --stat $_} . "\n" for @commitids;
}
if ($logs =~ /\S/) {
print "Today's commits:\n\n$logs\n";
} else {
print "I didn't find any commits today. I wonder why not?
Holiday? Wrong repository? Forgot to push? Out sick?
Or maybe the program couldn't fetch the new commits.
Better find out!
";
}
Jump to Line
Something went wrong with that request. Please try again.