]> Sergey Matveev's repositories - public-inbox.git/blobdiff - examples/cgit-commit-filter.lua
examples/cgit-commit-filter: remove unused variable
[public-inbox.git] / examples / cgit-commit-filter.lua
index 4b90125ff332669dcf2de635c95b3493856b6a8c..a8f9e1d1a9c129b69f42d295adb3fe3c19f3fb8a 100644 (file)
@@ -1,5 +1,5 @@
--- Copyright (C) 2015 all contributors <meta@public-inbox.org>
--- License: GPLv2 or later (https://www.gnu.org/licenses/gpl-2.0.txt)
+-- Copyright (C) 2015-2018 all contributors <meta@public-inbox.org>
+-- License: GPLv2 or later <https://www.gnu.org/licenses/gpl-2.0.txt>
 -- This commit filter maps a subject line to a search URL of a public-inbox
 -- disclaimer: written by someone who does not know Lua.
 --
@@ -8,16 +8,15 @@
 --
 --   commit-filter=lua:/path/to/this/script.lua
 --
--- Example: http://bogomips.org/public-inbox.git/
+-- Example site: https://80x24.org/public-inbox.git/
 
 local urls = {}
-urls['public-inbox.git'] = 'http://public-inbox.org/meta/'
+urls['public-inbox.git'] = 'https://public-inbox.org/meta/'
 -- additional URLs here...
 
 function filter_open(...)
        lineno = 0
        buffer = ""
-       subject = ""
 end
 
 function filter_close()
@@ -26,7 +25,7 @@ function filter_close()
                if u == nil then
                        html(buffer)
                else
-                       html('<a href="' .. u .. '?x=t&q=')
+                       html('<a href="' .. u .. '?x=t&amp;q=')
                        html_url_arg('"' .. buffer .. '"')
                        html('"><tt>')
                        html_txt(buffer)