Skip to content

Commit

Permalink
data/gerrit: Fix minor receive-notify.pl bugs around misplaced my
Browse files Browse the repository at this point in the history
  • Loading branch information
kallisti5 committed Aug 6, 2019
1 parent 474966a commit bdc623b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions data/gerrit/hooks/receive-notify.pl
Expand Up @@ -669,7 +669,7 @@ ($)
my $branch = "";

if ($ref =~ m/refs\/changes\//) {
print "Detected accepted Gerrit Changeset. Parsing for accepted patches...";
print "Detected accepted Gerrit Changeset. Parsing for accepted patches...\n";
$ref =~ s/\/meta$//;
# This is kind of shite. Gerrit gives us "refs/changes/79/1679/meta" while
# merging the "patchset id" into master. (refs/changes/79/1679/3 for example)
Expand All @@ -692,8 +692,8 @@ ($)
close BRANCHES;
}
} elsif ($ref =~ m/refs\/heads\//) {
print "Detected direct commit to branch.";
my $branch = $ref;
print "Detected direct commit to branch.\n";
$branch = $ref;
$branch =~ s/refs\/heads\///;
}
die "unable to determine '$ref' to branch linkage!\n" unless $branch ne "";
Expand Down Expand Up @@ -782,6 +782,7 @@ ($$)
my @allCommits;
foreach my $refInfo (@refInfos)
{
print "Processing '$refInfo->{ref}'...";
$refInfo->{diff_lines} = 0;
$refInfo->{branch} = find_branch_for_ref($refInfo->{ref});
$refInfo->{commits} = gather_commits_for_ref($refInfo->{oldSha1}, $refInfo->{newSha1}, $refInfo->{branch});
Expand Down

0 comments on commit bdc623b

Please sign in to comment.