1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Fix GITweb smartprefix blob, tree, and history commands.

This commit is contained in:
Miciah Dashiel Butler Masters 2006-01-16 18:53:56 +00:00 committed by Jonas Fonseca
parent c9f58a36c9
commit 750a915ebb

View File

@ -58,7 +58,7 @@ function cvsweb (base, project, url)
/* javascript:gitweb("http://pasky.or.cz/gitweb.cgi", "elinks.git", "%s"); */ /* javascript:gitweb("http://pasky.or.cz/gitweb.cgi", "elinks.git", "%s"); */
function gitweb(base, project, url) function gitweb(base, project, url)
{ {
var parts = url.match(/^(search|summary|shortlog|log|commit|commitdiff|tree|tag)(\s(.*))?/); var parts = url.match(/^(search|summary|shortlog|log|blob|commit|commitdiff|history|tree|tag)(\s(.*))?/);
var query = '?p=' + project; var query = '?p=' + project;
if (parts) { if (parts) {
@ -67,6 +67,8 @@ function gitweb(base, project, url)
/* If the extra arg is not for searching assume it is an ID. */ /* If the extra arg is not for searching assume it is an ID. */
if (parts[1] == 'search' && parts[3]) if (parts[1] == 'search' && parts[3])
query += ';s=' + escape(parts[3]); query += ';s=' + escape(parts[3]);
else if ((parts[1] == 'blob' || parts[1] == 'history' || parts[1] == 'tree') && parts[3])
query += ';f=' + escape(parts[3]);
else if (parts[3]) else if (parts[3])
query += ';h=' + escape(parts[3]); query += ';h=' + escape(parts[3]);