Skip to content

Commit

Permalink
[5] Implemented function to split commits into 2d array
Browse files Browse the repository at this point in the history
With this we have better accessibility

Signed-off-by: DoesntMatter <jaed1@gmx.net>
  • Loading branch information
DoesntMatter committed Jan 22, 2012
1 parent 7c4c8e4 commit 45f1163
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions gitlog_to_rss.pl
Expand Up @@ -105,3 +105,16 @@ sub ParseGitLog {
}
return $result;
}

sub SplitCommits {
my $gitlog = shift || return undef;
my @items = split(/\n>/, $gitlog);
my $size = scalar @items;
my (@lines, @commit, $i);

for $i ( 0 .. ($size - 1) ) {
@lines = split(/\n/, $items[$i], 5);
$commit[$i] = [ @lines ];
}
return @commit;
}

0 comments on commit 45f1163

Please sign in to comment.