diff options
-rwxr-xr-x | git2rss | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -23,12 +23,14 @@ use Suin\RSSWriter\Channel; use Suin\RSSWriter\Feed; use Suin\RSSWriter\Item; +$head = basename($_SERVER['argv'][1] ?? 'master'); + // Current change -exec('git log --format=fuller -1', $out); -$log = exec("git log --pretty=format:%H,%at,%cn,%an,%s -1"); +exec("git log --format=fuller --max-count=1 $head", $out); +$log = exec("git log --pretty=format:%H,%at,%cn,%an,%s --max-count=1 $head"); $entry = [ 'repo' => substr(getcwd(), strlen(LOCAL)), - 'head' => basename($_SERVER['argv'][1] ?? 'master'), + 'head' => $head, 'desc' => implode("<br/>\n", $out), ]; $log = exec("git log --pretty=format:%H,%at,%cn,%an,%s -1"); |