From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 7B3851F8C6 for ; Fri, 27 Aug 2021 18:38:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229947AbhH0SiT (ORCPT ); Fri, 27 Aug 2021 14:38:19 -0400 Received: from cloud.peff.net ([104.130.231.41]:60840 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229739AbhH0SiT (ORCPT ); Fri, 27 Aug 2021 14:38:19 -0400 Received: (qmail 9115 invoked by uid 109); 27 Aug 2021 18:37:29 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Fri, 27 Aug 2021 18:37:29 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 15528 invoked by uid 111); 27 Aug 2021 18:37:29 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Fri, 27 Aug 2021 14:37:29 -0400 Authentication-Results: peff.net; auth=none Date: Fri, 27 Aug 2021 14:37:28 -0400 From: Jeff King To: Junio C Hamano Cc: Krzysztof =?utf-8?Q?=C5=BBelechowski?= , Bryan Turner , Git Users Subject: Re: git log --encoding=HTML is not supported Message-ID: References: <9896630.2IqcCWsCYL@localhost.localdomain> <3883941.fE8Og5qy2N@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Fri, Aug 27, 2021 at 08:59:40AM -0700, Junio C Hamano wrote: > Krzysztof Żelechowski writes: > > > Dnia czwartek, 26 sierpnia 2021 17:37:40 CEST Junio C Hamano pisze: > >> git log --html \ > >> --format='%h%s...' > > > > 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