From patchwork Fri Jun 18 21:52:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 12332205 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C29DAC48BDF for ; Fri, 18 Jun 2021 21:52:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 91F2561279 for ; Fri, 18 Jun 2021 21:52:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234660AbhFRVyr (ORCPT ); Fri, 18 Jun 2021 17:54:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230338AbhFRVyr (ORCPT ); Fri, 18 Jun 2021 17:54:47 -0400 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32979C061574 for ; Fri, 18 Jun 2021 14:52:36 -0700 (PDT) Received: by mail-ot1-x333.google.com with SMTP id 7-20020a9d0d070000b0290439abcef697so11143611oti.2 for ; Fri, 18 Jun 2021 14:52:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=41PFC+E+zjNBS+Do6S+0t/hh5Tk45gkn4+l2AHlLcmU=; b=WK8rVRXNoHTd8gTjZkchBwb827ccj4Gu13W9InEKeTZRSsrqCiEcXhKuoE2iYkcj+5 o/jzc8FpbmDnnbI+XXyZPvr0koYAoNtaqkZrLRD8TZ2+hIJLgmku4ns4NkUD9PskxFVy fmjTt8vtZOSKSIlmpPn+qNw0Le0o4olwcbxeHZTQ6UUcBRbmtYL3E3foq9BgmOvFGnPg 7HAoIc6l/rB7zjFEgf6NoI3KyRRL7Cl8E0l4530VRluKgsS1LPJWDF0IXUYsSHV7nIrl lh1sXKHehayXOW7czPlewWkw7CmdaU2nRgYa510gJxHaeUiq2/STKbwF7iCrzfXq6jD0 f/Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=41PFC+E+zjNBS+Do6S+0t/hh5Tk45gkn4+l2AHlLcmU=; b=Ww0VyBz0nk1cSs5NOJ12gekIs2M7LQrhUBNDdq/M9CdIvrIjIgfZnAtnZ8aM8L1xs4 VlSFqzAyAjweQapjhS86KKmoCHrTyVLVwlB9HMOpynNK7eaHkv07Q1DMiCd+Byom/uQ4 CSYnudiiNO995owzstjBe1kcJw1gOD9LSt8vujkNVDuMqdVN31V2LORbTUZKMSAEf3tD nbaGV/enlHvS6knqv63UFqhSE9ImUPvrIPfv1IqRDic+dRIV/Z9LD63zWTIB4nCkMZXz 2jk2bYuuRp/1V91lSGzLGDLnel5YrSpCnw/DNDq2EJqBMCt4rabU3lIXTDgm+GLfjcY2 BXrw== X-Gm-Message-State: AOAM5312088SxGcgmerrwn+Lt7x5EhgvPFN1gfp+kpjL3g0qVSH5yYrh ir5IwI9+zPdODPLWfw41ny9XhbDckNE/UA== X-Google-Smtp-Source: ABdhPJwjVGS7NPXGyiXCIDDpIQY/KVHLdeWL3XOm1BP/cAOTSPQ7xEU1gzSB9YTBNsJb2fBkZBVB1A== X-Received: by 2002:a9d:1c9f:: with SMTP id l31mr10822843ota.244.1624053155341; Fri, 18 Jun 2021 14:52:35 -0700 (PDT) Received: from localhost (fixed-187-188-155-231.totalplay.net. [187.188.155.231]) by smtp.gmail.com with ESMTPSA id x31sm2247383ota.24.2021.06.18.14.52.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jun 2021 14:52:35 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?Martin_=C3=85gren?= , "brian m . carlson" , Bagas Sanjaya , Jeff King , Felipe Contreras Subject: [PATCH v5 1/4] doc: remove GNU troff workaround Date: Fri, 18 Jun 2021 16:52:28 -0500 Message-Id: <20210618215231.796592-2-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618215231.796592-1-felipe.contreras@gmail.com> References: <20210618215231.796592-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org In 2007 the docbook project made the mistake of converting ' to \' for man pages [1]. It's a problem because groff interprets \' as acute accent which is rendered as ' in ASCII, but as ยด in utf-8. This started a cascade of bug reports in git [2], debian [3], Arch Linux [4], docbook itself [5], and probably many others. A solution was to use the correct groff character: \(aq, which is always rendered as ', but the problem is that such character doesn't work in other troff programs. A portable solution required the use of a conditional character that is \(aq in groff, but ' in all others: .ie \n(.g .ds Aq \(aq .el .ds Aq ' The proper solution took time to be implemented in docbook, but in 2010 they did it [6]. So the docbook man page stylesheets were broken from 1.73 to 1.76. Unfortunately by that point many workarounds already existed. In the case of git GNU_ROFF was introduced, and in the case of Arch Linux a mappig from \' to ' was added to groff's man.local. Other distributions might have done the same, or similar workarounds. Since 2010 there is not need for this workaround, which is fixed elsewhere not just in docbook, but other layers as well. Let's remove it. Also, it's GNU troff, not GNU roff. [1] https://github.com/docbook/xslt10-stylesheets/commit/ea2a0bac56c56eec1892ac3d9254dca89f7c5746 [2] https://lore.kernel.org/git/20091012102926.GA3937@debian.b2j/ [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=507673#65 [4] https://bugs.archlinux.org/task/9643 [5] https://sourceforge.net/p/docbook/bugs/1022/ [6] https://github.com/docbook/xslt10-stylesheets/commit/fb553434265906ed81edc6d5f533d0b08d200046 Inspired-by: brian m. carlson Signed-off-by: Felipe Contreras --- Documentation/Makefile | 8 -------- Documentation/manpage-quote-apos.xsl | 16 ---------------- Makefile | 4 ---- 3 files changed, 28 deletions(-) delete mode 100644 Documentation/manpage-quote-apos.xsl diff --git a/Documentation/Makefile b/Documentation/Makefile index f5605b7767..bf1f66b3eb 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -178,14 +178,6 @@ MAN_BASE_URL = file://$(htmldir)/ endif XMLTO_EXTRA += -m manpage-base-url.xsl -# If your target system uses GNU groff, it may try to render -# apostrophes as a "pretty" apostrophe using unicode. This breaks -# cut&paste, so you should set GNU_ROFF to force them to be ASCII -# apostrophes. Unfortunately does not work with non-GNU roff. -ifdef GNU_ROFF -XMLTO_EXTRA += -m manpage-quote-apos.xsl -endif - ifdef USE_ASCIIDOCTOR ASCIIDOC = asciidoctor ASCIIDOC_CONF = diff --git a/Documentation/manpage-quote-apos.xsl b/Documentation/manpage-quote-apos.xsl deleted file mode 100644 index aeb8839f33..0000000000 --- a/Documentation/manpage-quote-apos.xsl +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - ' - \(aq - - - - diff --git a/Makefile b/Makefile index c3565fc0f8..7588c43f05 100644 --- a/Makefile +++ b/Makefile @@ -278,10 +278,6 @@ all:: # Define NO_ST_BLOCKS_IN_STRUCT_STAT if your platform does not have st_blocks # field that counts the on-disk footprint in 512-byte blocks. # -# Define GNU_ROFF if your target system uses GNU groff. This forces -# apostrophes to be ASCII so that cut&pasting examples to the shell -# will work. -# # Define USE_ASCIIDOCTOR to use Asciidoctor instead of AsciiDoc to build the # documentation. # From patchwork Fri Jun 18 21:52:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 12332207 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53DE7C48BE8 for ; Fri, 18 Jun 2021 21:52:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 39C0C6127C for ; Fri, 18 Jun 2021 21:52:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234675AbhFRVyt (ORCPT ); Fri, 18 Jun 2021 17:54:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234662AbhFRVys (ORCPT ); Fri, 18 Jun 2021 17:54:48 -0400 Received: from mail-oi1-x22a.google.com (mail-oi1-x22a.google.com [IPv6:2607:f8b0:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A722BC061574 for ; Fri, 18 Jun 2021 14:52:37 -0700 (PDT) Received: by mail-oi1-x22a.google.com with SMTP id q10so12104873oij.5 for ; Fri, 18 Jun 2021 14:52:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/eJfYuyMWyiWCOPrsfaoAoWCt8w0977TTw8ALPI2Ad8=; b=Ewj75WdQUgYkDHTSE6qKFCNskEk8G/U0GC6EQ7KhvpzQ6kydRXTWVSAI3aAHioQhUr ifTFunae9n7BVgtj2gOusy9z4V9omD4GD62lH1a3e54SO0DVECXEPaKo3Mwpkrzn00aj LAbF9jQjg66ANQh4kri9MCsfsRyTar8tlDHM1aXE051Y3DWR1auD4RSho69ompMJBdtn FQdyJ/OSLAhVXGEIGcZ10sZWVdCiI3Yb8BwUj1dRcrR/HQEAFox3Ie6XVpoMSYihixkN sUn4SZsWvVhKqUaDN4ZVLp+jLXwjPXYf3wwIZo2jksCUAv3LSYYGxLYXEhiOH8CKWL4S KcZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/eJfYuyMWyiWCOPrsfaoAoWCt8w0977TTw8ALPI2Ad8=; b=EdvrbU5ZCreF53x1+7djgDcVIyfZdnK4CorGHUBHmb4kakc/eA8QPUcpCyUvCTtOme I+7cDZI368MG2j2x+wdR9r9e1JwVm8TDcegN48PNqXDh2H4IsAN1hEY+g/g+qNN0sEX2 S6ssAcILtlndLAgHf/up4O32uY8CWC8bGL3Ax4ynGg1JzvrVD0jH7EDBXdRsFxZIMijs PLfKB9WJMkzLYwsbnEdnW/SbRU+D3DqSqbd/QyUHgWMd5briZVItP4oXVY7mLRmftYmM G8RJJcnCr7thAvuR6Ozr/irhLgmBYwwOq38AsVtXrOn+vYPy2GDaTBdkNQQb8buU4vD0 MpmQ== X-Gm-Message-State: AOAM532qd6TA3OF/DMR1oAdtL1j1pCKrHBNP69rB/Sll12Y41zqqdHI+ gBo5FFkNnW+4PZIOFws9pkX8DcZTAw5acA== X-Google-Smtp-Source: ABdhPJyE5UVIG9VySlzHfyUHJmRWfaFhQpLMiwTvGZtPSa5/CJ0hjbUSzZbVxHWAWl+pwYbQ8RuxBg== X-Received: by 2002:aca:a8c6:: with SMTP id r189mr16411152oie.169.1624053156888; Fri, 18 Jun 2021 14:52:36 -0700 (PDT) Received: from localhost (fixed-187-188-155-231.totalplay.net. [187.188.155.231]) by smtp.gmail.com with ESMTPSA id l2sm2385934otl.27.2021.06.18.14.52.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jun 2021 14:52:36 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?Martin_=C3=85gren?= , "brian m . carlson" , Bagas Sanjaya , Jeff King , Felipe Contreras Subject: [PATCH v5 2/4] doc: use --stringparam in xmlto Date: Fri, 18 Jun 2021 16:52:29 -0500 Message-Id: <20210618215231.796592-3-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618215231.796592-1-felipe.contreras@gmail.com> References: <20210618215231.796592-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Commit 50d9bbba92 (Documentation: Avoid use of xmlto --stringparam, 2009-12-04) introduced manpage-base-url.xsl because ancient versions of xmlto did not have --stringparam. However, that was more than ten years ago, no need for that complexity anymore. Signed-off-by: Felipe Contreras --- Documentation/.gitignore | 1 - Documentation/Makefile | 8 ++------ Documentation/manpage-base-url.xsl.in | 10 ---------- 3 files changed, 2 insertions(+), 17 deletions(-) delete mode 100644 Documentation/manpage-base-url.xsl.in diff --git a/Documentation/.gitignore b/Documentation/.gitignore index 9022d48355..e9f8d693b1 100644 --- a/Documentation/.gitignore +++ b/Documentation/.gitignore @@ -10,7 +10,6 @@ howto-index.txt doc.dep cmds-*.txt mergetools-*.txt -manpage-base-url.xsl SubmittingPatches.txt tmp-doc-diff/ GIT-ASCIIDOCFLAGS diff --git a/Documentation/Makefile b/Documentation/Makefile index bf1f66b3eb..84643a34e9 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -176,7 +176,7 @@ endif ifndef MAN_BASE_URL MAN_BASE_URL = file://$(htmldir)/ endif -XMLTO_EXTRA += -m manpage-base-url.xsl +XMLTO_EXTRA += --stringparam man.base.url.for.relative.links='$(MAN_BASE_URL)' ifdef USE_ASCIIDOCTOR ASCIIDOC = asciidoctor @@ -342,7 +342,6 @@ clean: $(RM) technical/*.html technical/api-index.txt $(RM) SubmittingPatches.txt $(RM) $(cmds_txt) $(mergetools_txt) *.made - $(RM) manpage-base-url.xsl $(RM) GIT-ASCIIDOCFLAGS $(MAN_HTML): %.html : %.txt $(ASCIIDOC_DEPS) @@ -351,10 +350,7 @@ $(MAN_HTML): %.html : %.txt $(ASCIIDOC_DEPS) $(OBSOLETE_HTML): %.html : %.txto $(ASCIIDOC_DEPS) $(QUIET_ASCIIDOC)$(TXT_TO_HTML) -o $@ $< -manpage-base-url.xsl: manpage-base-url.xsl.in - $(QUIET_GEN)sed "s|@@MAN_BASE_URL@@|$(MAN_BASE_URL)|" $< > $@ - -%.1 %.5 %.7 : %.xml manpage-base-url.xsl $(wildcard manpage*.xsl) +%.1 %.5 %.7 : %.xml $(wildcard manpage*.xsl) $(QUIET_XMLTO)$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $< %.xml : %.txt $(ASCIIDOC_DEPS) diff --git a/Documentation/manpage-base-url.xsl.in b/Documentation/manpage-base-url.xsl.in deleted file mode 100644 index e800904df3..0000000000 --- a/Documentation/manpage-base-url.xsl.in +++ /dev/null @@ -1,10 +0,0 @@ - - - - -@@MAN_BASE_URL@@ - - From patchwork Fri Jun 18 21:52:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 12332209 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6091C49361 for ; Fri, 18 Jun 2021 21:52:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 850F161279 for ; Fri, 18 Jun 2021 21:52:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234681AbhFRVyu (ORCPT ); Fri, 18 Jun 2021 17:54:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234662AbhFRVyu (ORCPT ); Fri, 18 Jun 2021 17:54:50 -0400 Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E3E3C061574 for ; Fri, 18 Jun 2021 14:52:39 -0700 (PDT) Received: by mail-ot1-x329.google.com with SMTP id i12-20020a05683033ecb02903346fa0f74dso11113031otu.10 for ; Fri, 18 Jun 2021 14:52:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3LrHspE4DvZAjyMVfY+o2HKU++SQ5WNKRglpQdlE7Qk=; b=gjH3Fy+zoqpxo1b+Kt4hpqsePmtR7HJb+MVq9kbq38n6hD4MAdHrT4VNYI/JtoGH4L QOsfkVP3PZdNi0cMNx8U+V9/mBHpkcGwzWMcxTupaYM5FN+VQZyBOvkyEq5Ye5v0MnJx w1O5wd8CcMocs0LYzN6BvIgnRNtnDp1O2JEu+ocyN4RDAFZPmOnuJsJbrXcxb20Y5+M1 7tGbygBQoJsm6sZpTO0AFWyxtye9654l9QQw9QKbF7A8jRRoAqE6ygO/xvWF6DBFWhJo bpje9UqHhs99GOuEq/5xORPUn6PwuIBubxGuJ+adyRq8uq+UPLqa+3GIves2+oZb68+p yucQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3LrHspE4DvZAjyMVfY+o2HKU++SQ5WNKRglpQdlE7Qk=; b=A+hPrTMvoj/agAikYYvfEb4ivtsUsdN1gJmAS/Uw/uyPzYa9D1hryTChJ9yV+zCQEH F6oJZVqRHkZ1b1w3XdQcCbM6L9mZ+ucTMCu5Vc+HH/p+VnjfSl3NJa5IhmReSX2sGPrh XhWbYKLwXz/r2nJOCazhYzUxnxfUuunSAy8v+I3QRpPsp6oiwhg/GeR1Jaxg2IfddnNV FY9h4kGmoYquAQrXebnXqZ4P5EIXt88JTqidQyzobOrBIQHu5W9EbI/q3ZarZAvEOGUc Wlc10AqsoEjWoXpXM7DzdAkfqmK4jxCgwQBVGQrT6J05iXCi75pG5y7R4+1GDjSEyEP/ mkXQ== X-Gm-Message-State: AOAM533uXzN8RwBPbw+vfKldILK3QjF7lHRN02Xseg7h97tszWL1K6TI VZmXRP6wJbTkTb0aA3lTqVJGNud1yAG1tg== X-Google-Smtp-Source: ABdhPJzHLSvKN5sVAo0mTfl/eMcJFdBjHdqyENuVjU6oRqEkUEGCWRQCk8glW/4L0ge59ymeTebuxQ== X-Received: by 2002:a05:6830:25cc:: with SMTP id d12mr8312104otu.160.1624053158720; Fri, 18 Jun 2021 14:52:38 -0700 (PDT) Received: from localhost (fixed-187-188-155-231.totalplay.net. [187.188.155.231]) by smtp.gmail.com with ESMTPSA id 7sm2033598oor.30.2021.06.18.14.52.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jun 2021 14:52:38 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?Martin_=C3=85gren?= , "brian m . carlson" , Bagas Sanjaya , Jeff King , Felipe Contreras Subject: [PATCH v5 3/4] doc: simplify version passing Date: Fri, 18 Jun 2021 16:52:30 -0500 Message-Id: <20210618215231.796592-4-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618215231.796592-1-felipe.contreras@gmail.com> References: <20210618215231.796592-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org The code to pass the version of the man page comes from 2007: 7ef195ba3e (Documentation: Add version information to man pages, 2007-03-25). However, both asciidoc and asciidoctor already do this by default. Asciidoctor doesn't read manversion, but there's no need since both tools just join mansource and manversion. Let's do that ourselves and get rid of a bunch of code. Signed-off-by: Felipe Contreras --- Documentation/Makefile | 3 +-- Documentation/asciidoc.conf | 19 ------------------- Documentation/asciidoctor-extensions.rb | 17 ----------------- 3 files changed, 1 insertion(+), 38 deletions(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index 84643a34e9..47053c78f8 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -137,8 +137,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) diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf index 3e4c13971b..60f76f43ed 100644 --- a/Documentation/asciidoc.conf +++ b/Documentation/asciidoc.conf @@ -51,25 +51,6 @@ ifdef::doctype-manpage[] endif::doctype-manpage[] endif::backend-docbook[] -ifdef::doctype-manpage[] -ifdef::backend-docbook[] -[header] -template::[header-declarations] - - -{mantitle} -{manvolnum} -{mansource} -{manversion} -{manmanual} - - - {manname} - {manpurpose} - -endif::backend-docbook[] -endif::doctype-manpage[] - ifdef::backend-xhtml11[] [attributes] git-relative-html-prefix= diff --git a/Documentation/asciidoctor-extensions.rb b/Documentation/asciidoctor-extensions.rb index d906a00803..70a0956663 100644 --- a/Documentation/asciidoctor-extensions.rb +++ b/Documentation/asciidoctor-extensions.rb @@ -23,26 +23,9 @@ module Git end end end - - class DocumentPostProcessor < Asciidoctor::Extensions::Postprocessor - def process document, output - if document.basebackend? 'docbook' - mansource = document.attributes['mansource'] - manversion = document.attributes['manversion'] - manmanual = document.attributes['manmanual'] - new_tags = "" \ - "#{mansource}\n" \ - "#{manversion}\n" \ - "#{manmanual}\n" - output = output.sub(/<\/refmeta>/, new_tags + "") - end - output - end - end end end Asciidoctor::Extensions.register do inline_macro Git::Documentation::LinkGitProcessor, :linkgit - postprocessor Git::Documentation::DocumentPostProcessor end From patchwork Fri Jun 18 21:52:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 12332211 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22592C48BDF for ; Fri, 18 Jun 2021 21:52:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 09A3E60FF4 for ; Fri, 18 Jun 2021 21:52:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234693AbhFRVyw (ORCPT ); Fri, 18 Jun 2021 17:54:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234685AbhFRVyv (ORCPT ); Fri, 18 Jun 2021 17:54:51 -0400 Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CA9FC061574 for ; Fri, 18 Jun 2021 14:52:41 -0700 (PDT) Received: by mail-ot1-x32d.google.com with SMTP id 102-20020a9d0eef0000b02903fccc5b733fso11122528otj.4 for ; Fri, 18 Jun 2021 14:52:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0SUxZ4NqQz+xS27wgan7HdR+ZmVT7uoo7sfzHIMnMOI=; b=A/MIf3HkROImDWFV+lJol5Ktwf9Q+hZLOzx7JBrWPAGZnAf7hUidgTeJFQ9kK6I1sP DfdqxFs6YsJwkgAhXM9rv6KgqhP0CkV3KtCcTOMkoa1lwe0yexlHsriyPwIVfOi/3g97 bx74Vw84BVz9dVjrHOUIH2ISYqcZJ8gGcKlGSPTZO3jS8iF5HbFCuRs50jTrC0HZdKoF RmEuLtbc6GhuohSLAnxewgnoifNdsLkoar5gdnLQe25Oe/GEqFKDG2Mn6xBCfY20KyUV cFVMNWuFJ3hVHNwx6fwoPnq74JkdrIJgaGugx9prdVDDpE9z3e7DgjqMpK4vyjQp7tXi cHdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0SUxZ4NqQz+xS27wgan7HdR+ZmVT7uoo7sfzHIMnMOI=; b=gh71o8AjkHoJMH8mYiqWa67aw7U1Zqhp6Y7XDtopR8QHjqZLeP3plPjPslR+T3SY+7 HjuoEtsAUSThnqob/0tLRyd7AjaZwL2d+FF5OcuuurQBJmSogtpo15lbWFQ3SynUFgpo frhi4+dgmXgGnytj2W7lnznWkWDTjs1/OxxPlblkgFMiE80cGOFOwxGqwd003Ps8kA3k ImNed5aMIcIOSI9tZB9oKStRQ1klZcO9Kz5wShBAJ9qtrEZOtifn1TaTR50NOhklZJSR z2Q76G74456FMOz+VL9r/GJn1rFqe9jU3fZL2iTpqP516SVV8lODCvVk+5XF9GnmMM1E MBUA== X-Gm-Message-State: AOAM533mf6PjQiAlGYbZ1Yho8+xt81uOHE9zAnPa6oS0l4IJcUbg+fpF NQtYt+MwKp+q83fiwrYavMb9UHlXVm7MIw== X-Google-Smtp-Source: ABdhPJz2w6VAsiANmHN0Y3jhztY6FmbdpIssyPvQQpcTNzwltjv8oBy+q46FsogpVg86ZArzoey+xg== X-Received: by 2002:a05:6830:4b1:: with SMTP id l17mr3788238otd.210.1624053160268; Fri, 18 Jun 2021 14:52:40 -0700 (PDT) Received: from localhost (fixed-187-188-155-231.totalplay.net. [187.188.155.231]) by smtp.gmail.com with ESMTPSA id v203sm2056520oie.52.2021.06.18.14.52.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jun 2021 14:52:39 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?Martin_=C3=85gren?= , "brian m . carlson" , Bagas Sanjaya , Jeff King , Felipe Contreras Subject: [PATCH v5 4/4] doc: asciidoc: remove unnecessary attribute Date: Fri, 18 Jun 2021 16:52:31 -0500 Message-Id: <20210618215231.796592-5-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618215231.796592-1-felipe.contreras@gmail.com> References: <20210618215231.796592-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org It's part of asciidoc global configuration since 2012. Signed-off-by: Felipe Contreras --- Documentation/asciidoc.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf index 60f76f43ed..f7908f9dea 100644 --- a/Documentation/asciidoc.conf +++ b/Documentation/asciidoc.conf @@ -12,7 +12,6 @@ [attributes] asterisk=* -plus=+ caret=^ startsb=[ endsb=]