diff options
| author | Junio C Hamano <gitster@pobox.com> | 2010-10-06 12:10:35 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2010-10-06 12:10:58 -0700 |
| commit | 314ae0f421511137580ff6707643ccb75b2d2b34 (patch) | |
| tree | 94d2ff6450229871a71716750bedb4f80ad11fec /gitweb/gitweb.perl | |
| parent | ee79b21778cb6b20451f2357ede33f3f5760338c (diff) | |
| parent | 7ce896b3000a7bd2ea24f02ad3051f43ad351e1f (diff) | |
| download | git-314ae0f421511137580ff6707643ccb75b2d2b34.tar.xz | |
Merge branch 'cw/gitweb-hilite-config'
* cw/gitweb-hilite-config:
Enable highlight executable path as a configuration option
Diffstat (limited to 'gitweb/gitweb.perl')
| -rwxr-xr-x | gitweb/gitweb.perl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index a85e2f6319..e5910ce8f9 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -165,6 +165,12 @@ our @diff_opts = ('-M'); # taken from git_commit # the gitweb domain. our $prevent_xss = 0; +# Path to the highlight executable to use (must be the one from +# http://www.andre-simon.de due to assumptions about parameters and output). +# Useful if highlight is not installed on your webserver's PATH. +# [Default: highlight] +our $highlight_bin = "++HIGHLIGHT_BIN++"; + # information about snapshot formats that gitweb is capable of serving our %known_snapshot_formats = ( # name => { @@ -3360,7 +3366,8 @@ sub run_highlighter { close $fd or die_error(404, "Reading blob failed"); open $fd, quote_command(git_cmd(), "cat-file", "blob", $hash)." | ". - "highlight --xhtml --fragment --syntax $syntax |" + quote_command($highlight_bin). + " --xhtml --fragment --syntax $syntax |" or die_error(500, "Couldn't open file or run syntax highlighter"); return $fd; } |
