Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Improve message after heuristic merge detection
  • Loading branch information
sorear committed Jan 5, 2011
1 parent 303ac6a commit b72de5a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions push.psgi
Expand Up @@ -32,11 +32,6 @@ sub report {
my @tgt = map { my ($a,$b) = split ',', $_; [ $a, "#$b" ] }
split '\+', $tgt;

if (@{ $blob->{commits} } > 15) {
common::put(\@tgt, "Some '" . $blob->{pusher}{name} ."' person just gave me a " . length($bits) . " byte commit packet. They need to be more careful in the future.");
return;
}

return if $blob->{ref} !~ m#^refs/heads/(.*)#;

my $project = $blob->{repository}{name};
Expand All @@ -45,6 +40,11 @@ sub report {
$project = "$project/$1";
}

if (@{ $blob->{commits} } > 15) {
common::put(\@tgt, "Heuristic branch merge: pushed " . @{ $blob->{commits} } . " commits to $project by " . $blob->{pusher}{name});
return;
}

for my $commit (@{ $blob->{commits} }) {
my @lines = split("\n", $commit->{message} // 'unknown');
pop(@lines) if $lines[-1] =~ /^git-svn-id: http/;
Expand Down

0 comments on commit b72de5a

Please sign in to comment.