diff options
author | bptato <nincsnevem662@gmail.com> | 2024-07-03 17:35:10 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-07-03 17:35:10 +0200 |
commit | 0a1b012ee8cd6640827995c375d914f3e942132b (patch) | |
tree | 0b13ef9426cf488fdce51ab1c3e943596863c1de /bonus/git.cgi | |
parent | 350e0e0a678784c408ea039b5e8301d7d102ca08 (diff) | |
download | chawan-0a1b012ee8cd6640827995c375d914f3e942132b.tar.gz |
git.cgi: add [drop] to stash menu
Diffstat (limited to 'bonus/git.cgi')
-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 a60193ed..a68ce9db 100755 --- a/bonus/git.cgi +++ b/bonus/git.cgi @@ -73,6 +73,7 @@ const cgi1 = `${cgi0}¶ms=show`; const cgi2 = `${cgi0}¶ms=log`; const cgi3 = `${cgi0}¶ms=switch`; const cgi4 = `${cgi0}¶ms=stash%20apply`; +const cgi5 = `${cgi0}¶ms=stash%20drop`; if (params[0] == "log") { runGitCmd(config, params, /[a-f0-9]{40}/g, x => `<a href='${cgi1}%20${x}'>${x}</a>`) @@ -84,7 +85,8 @@ if (params[0] == "log") { } else if (params[0] == "stash" && params[1] == "list") { runGitCmd(config, params, /^stash@\{([0-9]+)\}/g, (s, n) => `stash@{<a href='${cgi1}%20${s}'>${n}</a>}\ - <form method=POST action='${cgi4}%20${s}'><input type=submit value=apply></form>`); + <form method=POST action='${cgi4}%20${s}'><input type=submit value=apply></form>` + +` <form method=POST action='${cgi5}%20${s}'><input type=submit value=drop></form>`); } else { const safeForGet = ["show", "diff", "blame", "status"]; if (std.getenv("REQUEST_METHOD") != "POST" && |