]> Lady’s Gitweb - GitWikiWeb/blobdiff - build.js
Allow more git calls for Special:RecentlyChanged
[GitWikiWeb] / build.js
index bd8ff27ba2c0fe3743ba4132236fd65237c8cfbc..ca07283ba29bb747f7b353661da5b224607e554c 100644 (file)
--- a/build.js
+++ b/build.js
@@ -664,7 +664,8 @@ class GitWikiWebPage {
         }
         const results = new Array(6);
         const seen = new Set();
-        let recency = 5;
+        const maxRecency = Math.max(config.max_recency | 0, 0);
+        let recency = maxRecency;
         let current;
         do {
           const show = new Deno.Command("git", {
@@ -672,7 +673,7 @@ class GitWikiWebPage {
               "show",
               "-s",
               "--format=%H%x00%cI%x00%cD",
-              recency ? `HEAD~${5 - recency}` : commit,
+              recency ? `HEAD~${maxRecency - recency}` : commit,
             ],
             stdout: "piped",
             stderr: "piped",
This page took 0.048745 seconds and 4 git commands to generate.