summaryrefslogtreecommitdiffstats
path: root/git2rss
diff options
context:
space:
mode:
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");