From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 5B6E31F452 for ; Sun, 9 Apr 2023 19:08:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229485AbjDITIL (ORCPT ); Sun, 9 Apr 2023 15:08:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbjDITII (ORCPT ); Sun, 9 Apr 2023 15:08:08 -0400 Received: from cloud.peff.net (cloud.peff.net [104.130.231.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EEBD35A7 for ; Sun, 9 Apr 2023 12:08:07 -0700 (PDT) Received: (qmail 22888 invoked by uid 109); 9 Apr 2023 19:08:06 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Sun, 09 Apr 2023 19:08:06 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 23578 invoked by uid 111); 9 Apr 2023 19:08:05 -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; Sun, 09 Apr 2023 15:08:05 -0400 Authentication-Results: peff.net; auth=none Date: Sun, 9 Apr 2023 15:08:05 -0400 From: Jeff King To: Junio C Hamano Cc: Felipe Contreras , git@vger.kernel.org Subject: Re: [PATCH] doc: simplify man version Message-ID: <20230409190805.GA77061@coredump.intra.peff.net> References: <20230408001829.11031-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Sat, Apr 08, 2023 at 03:45:48PM -0700, Junio C Hamano wrote: > Felipe Contreras writes: > > > diff --git a/Documentation/Makefile b/Documentation/Makefile > > index a6ba5bd460..4721b000c1 100644 > > --- a/Documentation/Makefile > > +++ b/Documentation/Makefile > > @@ -150,8 +150,7 @@ ASCIIDOC_HTML = xhtml11 > > ASCIIDOC_DOCBOOK = docbook > > ASCIIDOC_CONF = -f asciidoc.conf > > ASCIIDOC_COMMON = $(ASCIIDOC) $(ASCIIDOC_EXTRA) $(ASCIIDOC_CONF) \ > > - -amanversion=$(GIT_VERSION) \ > > - -amanmanual='Git Manual' -amansource='Git' > > + -amanmanual='Git Manual' -amansource='Git $(GIT_VERSION)' > > ASCIIDOC_DEPS = asciidoc.conf GIT-ASCIIDOCFLAGS > > TXT_TO_HTML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_HTML) > > TXT_TO_XML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_DOCBOOK) > > Is this a complete patch, or will this leave us in an incomplete > in-between place? > > We have some references to manversion in "git grep manversion > Documentation/" in asciidoc.conf and asciidoctor-extensions.rb > remaining after this ptach is applied, which presumably are no > longer used. I would imagine that these leftover references end up > substituting them with something benign, like an empty string, in > the output, but it somehow makes me feel dirty [*]. I think we are OK with this patch on its own. Asciidoc seems to be smart enough to omit the empty XML element on its own. Asciidoctor isn't (and nor is ruby hack which adds it in), but docbook is essentially just concatenating them anyway. Either way, the generated roff looks like: .TH "GIT" "1" "2023\-04\-06" "Git 2\&.40\&.0\&.316\&.g67fafd" "Git Manual" (the first "GIT" is the command name, so this is from git.1). I do think we probably want to pair this with another patch removing the asciidoctor-extensions hack, but the reasoning there is separate (it was needed for some older versions that we can probably declare as "too old" now). -Peff