3 # Usage: linkgit:command[manpage-section]
5 # Note, {0} is the manpage section, while {target} is the command.
7 # Show GIT link as: <command>(<section>); if section is defined, else just show
11 (?su)[\\]?(?P<name>linkgit):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
23 ifdef::backend-docbook[]
27 {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
29 endif::backend-docbook[]
31 ifdef::backend-docbook[]
32 ifndef::git-asciidoc-no-roff[]
33 # "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
34 # v1.72 breaks with this because it replaces dots not in roff requests.
36 <example><title>{title}</title>
38 ifdef::doctype-manpage[]
40 endif::doctype-manpage[]
42 ifdef::doctype-manpage[]
44 endif::doctype-manpage[]
47 endif::git-asciidoc-no-roff[]
49 ifdef::git-asciidoc-no-roff[]
50 ifdef::doctype-manpage[]
51 # The following two small workarounds insert a simple paragraph after screen
53 <example><title>{title}</title>
56 </literallayout><simpara></simpara>
60 <formalpara{id? id="{id}"}><title>{title}</title><para>
61 {title%}<literallayout{id? id="{id}"}>
62 {title#}<literallayout>
65 {title#}</para></formalpara>
66 {title%}<simpara></simpara>
67 endif::doctype-manpage[]
68 endif::git-asciidoc-no-roff[]
69 endif::backend-docbook[]
71 ifdef::doctype-manpage[]
72 ifdef::backend-docbook[]
74 template::[header-declarations]
77 <refentrytitle>{mantitle}</refentrytitle>
78 <manvolnum>{manvolnum}</manvolnum>
79 <refmiscinfo class="source">Git</refmiscinfo>
80 <refmiscinfo class="version">{git_version}</refmiscinfo>
81 <refmiscinfo class="manual">Git Manual</refmiscinfo>
84 <refname>{manname}</refname>
85 <refpurpose>{manpurpose}</refpurpose>
87 endif::backend-docbook[]
88 endif::doctype-manpage[]
90 ifdef::backend-xhtml11[]
92 <a href="{target}.html">{target}{0?({0})}</a>
93 endif::backend-xhtml11[]