X-Git-Url: http://git.pk910.de/?p=phpgitweb.git;a=blobdiff_plain;f=htdocs%2Flib%2FGitCommand.class.php;fp=htdocs%2Flib%2FGitCommand.class.php;h=86174b5e6e29551eba91a7757378208d913fe9eb;hp=1e4b07f6b4c29e4001c22e2bc2031804ea7809ee;hb=5a1b314c0a0ab8ed9be7b857c7996d8a3f87e7ed;hpb=780b7fde2894a42749ac292fa3d180147afeff1a diff --git a/htdocs/lib/GitCommand.class.php b/htdocs/lib/GitCommand.class.php index 1e4b07f..86174b5 100644 --- a/htdocs/lib/GitCommand.class.php +++ b/htdocs/lib/GitCommand.class.php @@ -153,17 +153,18 @@ class GitCommand { $files = explode("\t", $entry['file']); $entry['from_file'] = $files[0]; $entry['to_file'] = $files[1]; - } + } else + $entry['from_file'] = $entry['to_file'] = $entry['file']; } else if(preg_match('/^(::+)((?:[0-7]{6} )+)((?:[0-9a-fA-F]{40} )+)([a-zA-Z]+)\t(.*)$/i', $line, $matches)) { $entry['parents'] = strlen($matches[1]); $from_modes = explode(" ", $matches[2]); - $entry['from_mode'] = array_slice($from_modes, 1); + $entry['from_mode'] = array_slice($from_modes, 1, -1); $entry['to_mode'] = $from_modes[0]; $from_ids = explode(" ", $matches[3]); - $entry['from_id'] = array_slice($from_ids, 1); + $entry['from_id'] = array_slice($from_ids, 1, -1); $entry['to_id'] = $from_ids[0]; $entry['status'] = str_split($matches[4]); - $entry['file'] = $matches[5]; + $entry['file'] = $entry['from_file'] = $entry['to_file'] = $matches[5]; } return $entry; }