summaryrefslogtreecommitdiffstats
path: root/git2rss
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2017-03-29 12:30:31 +0200
committerRemi Collet <fedora@famillecollet.com>2017-03-29 12:30:31 +0200
commitea4b71aaec5fbffb9bbfe335e0dbaa45d7811a50 (patch)
treeda0e44ad13fbb1a0515e0b461d944d707b07fa47 /git2rss
parent2377d5e19a0dc1742dfbd82d0fcd45422f402069 (diff)
get log for updated branch
Diffstat (limited to 'git2rss')
-rwxr-xr-xgit2rss8
1 files changed, 5 insertions, 3 deletions
diff --git a/git2rss b/git2rss
index 7995af3..a303c2f 100755
--- a/git2rss
+++ b/git2rss
@@ -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");