From 9cdd94720126eda181d3131e3446010bb4d0d7aa Mon Sep 17 00:00:00 2001 From: bptato Date: Mon, 25 Mar 2024 16:38:44 +0100 Subject: git.cgi: add "view" link to git switch panel --- bonus/git.cgi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bonus/git.cgi') diff --git a/bonus/git.cgi b/bonus/git.cgi index 3f2ed65e..a23e0060 100755 --- a/bonus/git.cgi +++ b/bonus/git.cgi @@ -70,9 +70,11 @@ if (params[0] == "log") { } else if (params[0] == "switch" && params.length == 1) { const f = startGitCmd(config, ["branch"]); const cgi = `${query.prefix}git.cgi?prefix=${query.prefix}&path=${query.path}¶ms=switch`; + const cgi2 = `${query.prefix}git.cgi?prefix=${query.prefix}&path=${query.path}¶ms=log`; while ((l = f.getline()) !== null) { console.log(l.replace(/^(\s+)([\w.-]+)$/g, - (_, ws, name) => `${ws}${name}`)); + (_, ws, name) => `${ws}${name} ` + + `(view)`)); } f.close(); } else { -- cgit 1.4.1-2-gfad0