git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Drew Northup <drew.northup@maine.edu>
Cc: Junio C Hamano <gitster@pobox.com>,
	Jochen Schmitt <Jochen@herr-schmitt.de>,
	Jakub Narebski <jnareb@gmail.com>, Adam Tkac <atkac@redhat.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] Fix wrong xhtml option to highlight
Date: Thu, 27 Jan 2011 11:00:53 -0800	[thread overview]
Message-ID: <7vvd1agoii.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <1296092646.23506.10.camel@drew-northup.unet.maine.edu> (Drew Northup's message of "Wed\, 26 Jan 2011 20\:44\:06 -0500")

Drew Northup <drew.northup@maine.edu> writes:

>> > diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
>> > index 1025c2f..b662420 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 |"
>> > +	          " -xhtml --fragment --syntax $syntax |"
>> 
>> Curious.
>> 
>> Does the command take double-dash for the fragment and syntax options but
>> a single dash for the xhtml option?  Really...
>> 
>> A few top hits returned by Google for "highlight manual page" tells me
>> otherwise.
>
> Certainly appears to be the case that "--xhtml" is the option in Ubuntu
> 10.04.1 LTS. 
>
> Jochen,
> Did you mean "-X" (which sets the same option)?

The current proposal is to drop --xhtml and let highlight default to HTML.

Honestly speaking, I don't like the approach very much; it would have been
much better if highlight had a single way that is supported throughout its
versions to specify the output format.  But it appears that there isn't,
and relying on and hoping for its default to stay HTML is the best we
could do, if we plan to support highlight 2.4.something or older.

The copy of U10.04 I have has highlight 2.12, and according to its manual
pages, -X, --xhtml, and --out-format=xhtml mean the same thing.  HTML is
the default.

The change-log at www.andre-simon.de indicates that --out-format has
become the preferred method and the short options like -X and -H are not
supported in recent versions (3.0 beta and newer).

But as Jakub mentioned, 2.4.5 did not have --output-format; it was only in
3.0 beta that -O was redefined to mean --output-format and in old versions
the short option meant something else.

What a mess...

The next time we introduce a new dependency, we really should try hard to
assess the stability and maturity of that dependency.  In hindsight, I
think "highlight" was probably a bit too premature to be depended upon.

  reply	other threads:[~2011-01-27 19:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-24 19:44 [PATCH] Fix wrong xhtml option to highlight Jochen Schmitt
2011-01-24 22:48 ` Junio C Hamano
2011-01-27  1:44   ` Drew Northup
2011-01-27 19:00     ` Junio C Hamano [this message]
2011-01-28 12:35       ` Jakub Narebski

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vvd1agoii.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Jochen@herr-schmitt.de \
    --cc=atkac@redhat.com \
    --cc=drew.northup@maine.edu \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).