Re: git log --encoding=HTML is not supported

2 messages, 2 authors, 2021-08-27 · open the first message on its own page

Re: git log --encoding=HTML is not supported

From: Junio C Hamano <hidden>
Date: 2021-08-27 15:59:45

Krzysztof Żelechowski [off-list ref] writes:
Dnia czwartek, 26 sierpnia 2021 17:37:40 CEST Junio C Hamano pisze:
quoted
        git log --html \
                --format='<tr><td>%h</td><td>%s</td>...</tr>'
I would like to be able to say:
 { git config i18n.logOutputEscape HTML; }

What do you think?
It depends on what it does.

If the configuration means that "git log" output (with any supported
options, like "-p") will be given with '<' written to '^lt;' etc. so
that it becomes safe to dump it in HTML, it fails to interest me at
all.

Re: git log --encoding=HTML is not supported

From: Jeff King <hidden>
Date: 2021-08-27 18:37:31

On Fri, Aug 27, 2021 at 08:59:40AM -0700, Junio C Hamano wrote:
Krzysztof Żelechowski [off-list ref] writes:
quoted
Dnia czwartek, 26 sierpnia 2021 17:37:40 CEST Junio C Hamano pisze:
quoted
        git log --html \
                --format='<tr><td>%h</td><td>%s</td>...</tr>'
I would like to be able to say:
 { git config i18n.logOutputEscape HTML; }

What do you think?
It depends on what it does.

If the configuration means that "git log" output (with any supported
options, like "-p") will be given with '<' written to '^lt;' etc. so
that it becomes safe to dump it in HTML, it fails to interest me at
all.
Yeah, I think things get pretty weird when you start thinking about
dumping whole filenames and diff contents.

I wouldn't be opposed to an option for the pretty formatter to have
encodings. Something like:

  git log --format='%(authorname:quote=html)'

I'd probably put off implementing that until we actually unify the
for-each-ref and pretty formats, though (we do not even have
%(authorname) at this point!). The latter already has a quoting
mechanism for shell/perl/python/tcl (though it is not per-atom, and I
wouldn't be opposed to a --format-quote option that quoted all pretty.c
placeholders).

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help