@@ 142-144 (lines=3) @@ | ||
139 | foreach ($output as $line) { |
|
140 | if (substr($line, 0, 7)=='commit ') { |
|
141 | $info['h'] = substr($line, 7); |
|
142 | } elseif (substr($line, 0, 4) === 'tree') { |
|
143 | $info['tree'] = substr($line, 5); |
|
144 | } elseif (substr($line, 0, 6) === 'parent') { |
|
145 | foreach (explode(" ", substr($line, 7)) as $item) { |
|
146 | $info['parents'][] = Html::a('<span class="">'.$item.'</span>', |
|
147 | ["commitview", 'id' => $this->repository, 'hash' => $item], |
|
@@ 358-360 (lines=3) @@ | ||
355 | $lineNumOld = $matches[1] - 1; |
|
356 | $lineNumNew = $matches[1] - 1; |
|
357 | $output['contents'][] = array('lineNumOld'=> "-", 'lineNumNew'=> "-", 'lineCode' => "<pre class='chunk'>".$item."</pre>",); |
|
358 | } elseif ('---' === substr($item, 0, 3)) { |
|
359 | $output['info'] .= "<pre class='old'>".$item."</pre>"; |
|
360 | } elseif ('+++' === substr($item, 0, 3)) { |
|
361 | $output['info'] .= "<pre class='new'>".$item."</pre>"; |
|
362 | } elseif ('\ ' === substr($item, 0, 2)) { |
|
363 | $output['contents'][] = array('lineNumOld'=> "-", 'lineNumNew'=> "-", 'lineCode'=> "<pre>".htmlspecialchars($item)."</pre>",); |
|
@@ 456-458 (lines=3) @@ | ||
453 | foreach($this->run_git("tag -v ".$tag) as $line) { |
|
454 | if (substr($line, 0, 6) === 'object') { |
|
455 | $tags['h'] = substr($line, 7); |
|
456 | } elseif (substr($line, 0, 4) === 'type') { |
|
457 | $tags['type'] = substr($line, 5); |
|
458 | } elseif (substr($line, 0, 6) === 'tagger') { |
|
459 | preg_match($pattern, $line, $matches); |
|
460 | $tags['name'] = $matches[2]; |
|
461 | $tags['mail'] = $matches[3]; |
|
@@ 467-469 (lines=3) @@ | ||
464 | $tags['utcstamp'] = $matches[4]; |
|
465 | $tags['datetime'] = strftime($this->datetimeFormat, $tags['utcstamp']); |
|
466 | $tags['datetime_local'] = strftime($this->datetimeFormat, $tags['stamp']) .' '. $tags['timezone']; |
|
467 | } elseif (substr($line, 0, 3) === 'tag') { |
|
468 | $tags['tag'] = substr($line, 4); |
|
469 | } elseif (!empty($line)) { |
|
470 | $tags['message'] .= $line.'<br>'; |
|
471 | } |
|
472 | } |