diff options
author | Remi Collet <fedora@famillecollet.com> | 2017-03-29 12:30:31 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2017-03-29 12:30:31 +0200 |
commit | ea4b71aaec5fbffb9bbfe335e0dbaa45d7811a50 (patch) | |
tree | da0e44ad13fbb1a0515e0b461d944d707b07fa47 /git2rss | |
parent | 2377d5e19a0dc1742dfbd82d0fcd45422f402069 (diff) |
get log for updated branch
Diffstat (limited to 'git2rss')
-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"); |