Skip to content

Commit

Permalink
Initiate the counter outside the loop ;)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ratler committed Jul 8, 2012
1 parent a3f77d7 commit 3caa1a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Lunar/GitHUB.pm
Expand Up @@ -100,8 +100,8 @@ sub format_message {

# List files with additions/deletions
my $nr_files_changed = scalar(@{$$commit->{'patch'}->{'files'}});
my $counter = 0;
foreach my $file (@{$$commit->{'patch'}->{'files'}}) {
my $counter = 0;
if ($file->{'changes'} > 0) {
$message .= sprintf(" %-60s %-10s\n", $file->{'filename'}, "+" . $file->{'additions'} . "/-" . $file->{'deletions'});
} else { #for now we assume this is a renamed file heaven forbid if I'm wrong ;)
Expand Down

0 comments on commit 3caa1a4

Please sign in to comment.