From: Jakub Narebski <jnareb@gmail.com>
To: Adam Tkac <atkac@redhat.com>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] Pass "-O xhtml" param to highlight instead of "-xhtml"
Date: Wed, 26 Jan 2011 13:34:32 -0800 (PST) [thread overview]
Message-ID: <m339ofbb9t.fsf@localhost.localdomain> (raw)
In-Reply-To: <20110126171118.GA867@traged.englab.brq.redhat.com>
Adam Tkac <atkac@redhat.com> writes:
> Hello,
>
> attached patch fixes the gitweb.perl script.
Please don't send patches as attachements, but inline.
See Documentation/SubmittingPatches
> Current highlight utility doesn't recognize "--xhtml" parameter, it
> recognizes only "-O xhtml" parameter.
>
> Reference: https://bugzilla.redhat.com/show_bug.cgi?id=672293
Shouldn't the above be in commit message?
> Subject: [PATCH] Pass "-O xhtml" parameter instead of "--xhtml" to hightlight in gitweb.
Why the mismatch between subject of email, and subject in attached
patch?
> Signed-off-by: Jochen Schmitt <jochen@herr-schmitt.de>
> Signed-off-by: Adam Tkac <atkac@redhat.com>
> ---
> gitweb/gitweb.perl | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
> index 1025c2f..88556f4 100755
> --- a/gitweb/gitweb.perl
> +++ b/gitweb/gitweb.perl
> @@ -3468,7 +3468,7 @@ sub run_highlighter {
> close $fd;
> open $fd, quote_command(git_cmd(), "cat-file", "blob", $hash)." | ".
> quote_command($highlight_bin).
> - " --xhtml --fragment --syntax $syntax |"
> + " -O xhtml --fragment --syntax $syntax |"
> or die_error(500, "Couldn't open file or run syntax highlighter");
> return $fd;
> }
In highlight 2.4.5 '-O' means "name of output directory", i.e. --outdir.
There is no --out-format either.
WTF this backward incompatibile change in highlight... the only
solution that would make it work both for old and for new versions is
to rely on the fact that HTML is default output format, i.e.
open $fd, quote_command(git_cmd(), "cat-file", "blob", $hash)." | ".
quote_command($highlight_bin).
- " --xhtml --fragment --syntax $syntax |"
+ " --fragment --syntax $syntax |"
or die_error(500, "Couldn't open file or run syntax highlighter");
--
Jakub Narebski
Poland
ShadeHawk on #git
next prev parent reply other threads:[~2011-01-26 21:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-26 17:11 [PATCH] Pass "-O xhtml" param to highlight instead of "-xhtml" Adam Tkac
2011-01-26 21:34 ` Jakub Narebski [this message]
2011-01-26 21:43 ` Junio C Hamano
2011-01-27 12:03 ` Adam Tkac
2011-01-27 12:51 ` [PATCH] Don't pass "--xhtml" to hightlight in gitweb.perl script Adam Tkac
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m339ofbb9t.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=atkac@redhat.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox