diff options
-rwxr-xr-x | bonus/git.cgi | 4 |
1 files changed, 3 insertions, 1 deletions
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}<a href='${cgi}%20${name}'>${name}</a>`)); + (_, ws, name) => `${ws}<a href='${cgi}%20${name}'>${name}</a> ` + + `(<a href='${cgi2}%20${name}'>view</a>)`)); } f.close(); } else { |