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

[PATCH 16/23] doc-diff: support asciidoctor man pages

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Jun 21, 2021, 16:31 UTC
Message-ID
<20210621163110.1074145-17-felipe.contreras@gmail.com>
In-Reply-To
<20210621163110.1074145-1-felipe.contreras@gmail.com>
From: Jeff King <peff@peff.net>

The new option enables both asciidoctor as well as its direct-to-manpage mode that skips xmlto. This lets you view the rendered difference between the two pipelines with something like:

  ./doc-diff --from-asciidoctor --to-asciidoctor-direct HEAD HEAD
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 Documentation/doc-diff | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
diff --git a/Documentation/doc-diff b/Documentation/doc-diff
index 6b6bb444ac..bbfeaa213b 100755
--- a/Documentation/doc-diff
+++ b/Documentation/doc-diff
@@ -17,10 +17,13 @@ f			force rebuild; do not rely on cached results
 c,clean			cleanup temporary working files
 from-asciidoc		use asciidoc with the 'from'-commit
 from-asciidoctor	use asciidoctor with the 'from'-commit
+from-asciidoctor-direct use asciidoctor without xmlto for 'from'-commit
 asciidoc		use asciidoc with both commits
 to-asciidoc		use asciidoc with the 'to'-commit
 to-asciidoctor		use asciidoctor with the 'to'-commit
+to-asciidoctor-direct   use asciidoctor without xmlto for 'to'-commit
 asciidoctor		use asciidoctor with both commits
+asciidoctor-direct      use asciidoctor without xml for both commits
 "
 SUBDIRECTORY_OK=1
 . "$(git --exec-path)/git-sh-setup"
@@ -53,6 +56,13 @@ do
 	--asciidoc)
 		from_program=-asciidoc
 		to_program=-asciidoc ;;
+	--from-asciidoctor-direct)
+		from_program=-asciidoctor-direct ;;
+	--to-asciidoctor-direct)
+		to_program=-asciidoctor-direct ;;
+	--asciidoctor-direct)
+		from_program=-asciidoctor-direct
+		to_program=-asciidoctor-direct ;;
 	--)
 		shift; break ;;
 	*)
@@ -108,6 +118,10 @@ construct_makemanflags () {
 	elif test "$1" = "-asciidoctor"
 	then
 		echo USE_ASCIIDOCTOR=YesPlease ASCIIDOC_FLAGS='-adocdate="01/01/1970"'
+	elif test "$1" = "-asciidoctor-direct"
+	then
+		echo USE_ASCIIDOCTOR=YesPlease ASCIIDOC_FLAGS='-adocdate="01/01/1970"'
+		echo USE_ASCIIDOCTOR_MANPAGE=YesPlease
 	fi
 }
 
-- 
2.32.0
Previous: Felipe ContrerasNext: Felipe Contreras
Message 19 of 28 in “doc: cleanups and asciidoctor direct man pages”
  1. 00/23 doc: cleanups and asciidoctor direct man pagesFelipe Contreras, Jun 21, 2021
  2. 01/23 doc: remove GNU troff workaroundFelipe Contreras, Jun 21, 2021
  3. 03/23 doc: simplify version passingFelipe Contreras, Jun 21, 2021
  4. 02/23 doc: use --stringparam in xmltoFelipe Contreras, Jun 21, 2021
  5. 04/23 doc: asciidoc: remove unnecessary attributeFelipe Contreras, Jun 21, 2021
  6. 05/23 doc: asciidoctor: remove unnecessary requireFelipe Contreras, Jun 21, 2021
  7. 07/23 doc: asciidoctor: reorganize extensionsFelipe Contreras, Jun 21, 2021
  8. 06/23 doc: asciidoctor: remove cruftFelipe Contreras, Jun 21, 2021
  9. 10/23 doc: asciidoctor: improve string handlingFelipe Contreras, Jun 21, 2021
  10. 11/23 doc: asciidoctor: split the format from the codeFelipe Contreras, Jun 21, 2021
  11. 09/23 doc: asciidoctor: refactor macro registrationFelipe Contreras, Jun 21, 2021
  12. 08/23 doc: asciidoctor: use html-prefix only for htmlFelipe Contreras, Jun 21, 2021
  13. 12/23 doc: asciidoctor: specify name of our groupFelipe Contreras, Jun 21, 2021
  14. 13/23 doc: doc-diff: set docdate manuallyFelipe Contreras, Jun 21, 2021
  15. 14/23 doc-diff: drop --cut-footer switchFelipe Contreras, Jun 21, 2021
  16. 15/23 doc: use asciidoctor to build man pages directlyFelipe Contreras, Jun 21, 2021
  17. Bagas SanjayaJun 22, 2021
  18. Felipe ContrerasJun 23, 2021
  19. 16/23 doc-diff: support asciidoctor man pagesFelipe Contreras, Jun 21, 2021
  20. 19/23 doc: asciidoctor: add hack for xrefsFelipe Contreras, Jun 21, 2021
  21. 20/23 doc: asciidoctor: add hack to improve linksFelipe Contreras, Jun 21, 2021
  22. 22/23 doc: asciidoctor: cleanup man page hackFelipe Contreras, Jun 21, 2021
  23. 17/23 doc: asciidoctor: add linkgit macros in man pagesFelipe Contreras, Jun 21, 2021
  24. 18/23 doc: add man pages workaround for asciidoctorFelipe Contreras, Jun 21, 2021
  25. 23/23 doc: asciidoctor: add hack for old versionsFelipe Contreras, Jun 21, 2021
  26. 21/23 doc: asciidoctor: add support for baseurlFelipe Contreras, Jun 21, 2021
  27. Bagas SanjayaJun 22, 2021
  28. Felipe ContrerasJun 23, 2021

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.