Permalink
Browse files

[5] Implemented function to split commits into 2d array

With this we have better accessibility

Signed-off-by: DoesntMatter <jaed1@gmx.net>
  • Loading branch information...
DoesntMatter committed Jan 21, 2012
1 parent 7c4c8e4 commit 45f1163597b8173b4a42083362acf9b18dfc8735
Showing with 13 additions and 0 deletions.
  1. +13 −0 gitlog_to_rss.pl
View
@@ -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.