diff --git a/SourceGitweb/SourceGitweb.php b/SourceGitweb/SourceGitweb.php
index cd45709..4f4ed46 100644
--- a/SourceGitweb/SourceGitweb.php
+++ b/SourceGitweb/SourceGitweb.php
@@ -295,8 +295,11 @@
$t_commit['committer_email'] = $t_matches[2];
}
- if( preg_match( '#
parent | ]*>([a-f0-9]*) | #', $t_gitweb_data, $t_matches ) ) {
- $t_commit['parent'] = $t_matches[1];
+ $t_parents = array();
+ if( preg_match_all( '#
parent | ]*>([a-f0-9]*) | #', $t_gitweb_data, $t_matches ) ) {
+ foreach( $t_matches as $t_match ) {
+ $t_parents[] = $t_commit['parent'] = $t_match[1];
+ }
}
preg_match( '#(.*)
#', $t_gitweb_data, $t_matches );
@@ -333,11 +336,6 @@
$t_commit['files'][] = $t_file;
}
- $t_parents = array();
- if ( isset( $t_commit['parent'] ) ) {
- $t_parents[] = $t_commit['parent'];
- }
-
$t_changeset = new SourceChangeset( $p_repo->id, $t_commit['revision'], $p_branch,
$t_commit['date'], $t_commit['author'], $t_commit['message'], 0,
( isset( $t_commit['parent'] ) ? $t_commit['parent'] : '' ) );