diff --git a/SourceGitweb/SourceGitweb.php b/SourceGitweb/SourceGitweb.php
index 7fd6e80..404651d 100644
--- a/SourceGitweb/SourceGitweb.php
+++ b/SourceGitweb/SourceGitweb.php
@@ -275,37 +275,31 @@
if ( !SourceChangeset::exists( $p_repo->id, $t_commit['revision'] ) ) {
# Parse for commit data
- preg_match( '#
| \w*, (\d* \w* \d* \d*:\d*:\d*)#', $t_gitweb_data, $t_matches );
+ preg_match( '#authored by ([^"]*).*?authored by ([^"]*).*?>([^<]*\d*:\d*:\d*[^(<]*)'
+ . '.*?committed by ([^"]*).*?committed by ([^"]*).*?page_body">(.*?)#',
+ $t_gitweb_data, $t_matches );
$t_commit['author'] = $t_matches[1];
$t_commit['author_email'] = $t_matches[2];
$t_commit['date'] = date( 'Y-m-d H:i:s', strtotime( $t_matches[3] ) );
-
- if( preg_match( '#committer | (?:]*>)?([^<>]*)(?:)? *(?:]*>)?<([^<>]*)>(?:)? | (?:<[^<>]*>\s*)*? #', $t_gitweb_data, $t_matches ) ) {
- $t_commit['committer'] = $t_matches[1];
- $t_commit['committer_email'] = $t_matches[2];
- }
+ $t_commit['committer'] = $t_matches[4];
+ $t_commit['committer_email'] = $t_matches[5];
+ $t_commit['message'] = trim( str_replace( ' ', PHP_EOL, $t_matches[6] ) );
$t_parents = array();
- if( preg_match_all( '#parent | ]*>([a-f0-9]*) | #', $t_gitweb_data, $t_matches ) ) {
+ if ( preg_match_all( '#parent<[^>]*h=([0-9a-f]*)#', $t_gitweb_data, $t_matches ) ) {
foreach( $t_matches[1] as $t_match ) {
$t_parents[] = $t_commit['parent'] = $t_match;
}
}
- preg_match( '# \n(.*)\n #', $t_gitweb_data, $t_matches );
- $t_commit['message'] = trim( str_replace( ' ', PHP_EOL, $t_matches[1] ) );
-
# Strip ref links and signoff spans from commit message
- $t_commit['message'] = preg_replace( array(
- '@]*>([^<]*)<\/a>@',
- '@]*>([^<]*<[^>]*>[^<]*)<\/span>@', #finds signed-off by
- ), '$1', $t_commit['message'] );
+ $t_commit['message'] = preg_replace( array( '#]*>([^<]*)#', '#]*>(.*?)#' ),
+ '$1', $t_commit['message'] );
# Parse for changed file data
$t_commit['files'] = array();
- preg_match_all( '# | \n([^<>]+) | '.
- '\n(?:[^<>]*)? | #',
+ preg_match_all( '#class="list".*?h=(\w*)[^>]*>([^<]*)(?:(?: | |