or return undef;
my @reflist;
- my $firstref;
foreach my $commit (@commits) {
foreach my $ref (@{$refs->{$commit}}) {
- $firstref = $ref unless $firstref;
+ return $ref unless wantarray;
push @reflist, $ref;
}
}
- return wantarray ? @reflist : $firstref;
+ return @reflist;
}
## ----------------------------------------------------------------------