mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-01-18 06:17:55 -05:00
21 lines
451 B
PHP
21 lines
451 B
PHP
<?php
|
|
|
|
$fp = fopen("/root/commits.txt", "r");
|
|
|
|
$commits = array();
|
|
$previous_author = '';
|
|
while (($line = fgets($fp)) !== FALSE) {
|
|
list($mode, $sha, $current_author, $subject) = explode('|', $line);
|
|
if ($previous_author == '' || $previous_author !== $current_author) {
|
|
$previous_author = $current_author;
|
|
}
|
|
else {
|
|
$mode = 'f';
|
|
}
|
|
$output[] = implode(' ', array($mode, $sha, $subject));
|
|
}
|
|
|
|
fclose($fp);
|
|
|
|
print implode(' ', $output);
|