git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Pass "-O xhtml" param to highlight instead of "-xhtml"

From
ATAdam Tkac <atkac@redhat.com>
Date
Jan 27, 2011, 12:03 UTC
Message-ID
<20110127120323.GA3416@traged.englab.brq.redhat.com>
In-Reply-To
<7vaainjq7f.fsf@alter.siamese.dyndns.org>
On Wed, Jan 26, 2011 at 01:43:48PM -0800, Junio C Hamano wrote:
Show 20 quoted lines
> Jakub Narebski <jnareb@gmail.com> writes:
> 
> >> 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?
> 
> Actually, I prefer not having that "Reference" in the commit message
> myself, but I do want to have some relevant details
> missing from the proposed commit message but is in
> that ticket (especially the comment #5) in the commit message.
> 
> > In highlight 2.4.5 '-O' means "name of output directory", i.e. --outdir.
> > There is no --out-format either.
> 
> Thanks for digging about 2.4.5; in that case, unlike the redhat ticket
> hinted, this change may not be backward compatible enough, as it seems
> that the compatibility goes only back to 3.0.something.
Right you are, I digged too shallowly, thanks for your inspection.
Show 17 quoted lines
> 
> >
> > 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");
> 
> Adam, Jochen?  How does the counterproposal look to you?
> 
> Without knowing much about highlight nor using gitweb in general myself,
> the above looks a bit more reasonable fix to the issue, if the default
> format has been and will stay to be HTML.

The proposal looks like the best (and the only one) correct solution. I will send updated patch.

Regards, Adam
-- 
Adam Tkac, Red Hat, Inc.
Previous: Junio C HamanoNext: Adam Tkac
Message 4 of 5 in “Pass "-O xhtml" param to highlight instead of "-xhtml"”
  1. Pass "-O xhtml" param to highlight instead of "-xhtml"Adam Tkac, Jan 26, 2011
  2. Jakub NarebskiJan 26, 2011
  3. Junio C HamanoJan 26, 2011
  4. Adam TkacJan 27, 2011
  5. Don't pass "--xhtml" to hightlight in gitweb.perl script.Adam Tkac, Jan 27, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.