remote.c: use shorten_unambiguous_ref
[git/dkf.git] / Documentation / asciidoc.conf
blobdc76e7f073f23cd911da0b0d0d49b72726576f1a
1 ## linkgit: macro
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
8 # the command.
10 [macros]
11 (?su)[\\]?(?P<name>linkgit):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
13 [attributes]
14 asterisk=&#42;
15 plus=&#43;
16 caret=&#94;
17 startsb=&#91;
18 endsb=&#93;
19 tilde=&#126;
21 ifdef::backend-docbook[]
22 [linkgit-inlinemacro]
23 {0%{target}}
24 {0#<citerefentry>}
25 {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
26 {0#</citerefentry>}
27 endif::backend-docbook[]
29 ifdef::backend-docbook[]
30 ifndef::git-asciidoc-no-roff[]
31 # "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
32 # v1.72 breaks with this because it replaces dots not in roff requests.
33 [listingblock]
34 <example><title>{title}</title>
35 <literallayout>
36 ifdef::doctype-manpage[]
37 &#10;.ft C&#10;
38 endif::doctype-manpage[]
40 ifdef::doctype-manpage[]
41 &#10;.ft&#10;
42 endif::doctype-manpage[]
43 </literallayout>
44 {title#}</example>
45 endif::git-asciidoc-no-roff[]
47 ifdef::git-asciidoc-no-roff[]
48 ifdef::doctype-manpage[]
49 # The following two small workarounds insert a simple paragraph after screen
50 [listingblock]
51 <example><title>{title}</title>
52 <literallayout>
54 </literallayout><simpara></simpara>
55 {title#}</example>
57 [verseblock]
58 <formalpara{id? id="{id}"}><title>{title}</title><para>
59 {title%}<literallayout{id? id="{id}"}>
60 {title#}<literallayout>
62 </literallayout>
63 {title#}</para></formalpara>
64 {title%}<simpara></simpara>
65 endif::doctype-manpage[]
66 endif::git-asciidoc-no-roff[]
67 endif::backend-docbook[]
69 ifdef::doctype-manpage[]
70 ifdef::backend-docbook[]
71 [header]
72 template::[header-declarations]
73 <refentry>
74 <refmeta>
75 <refentrytitle>{mantitle}</refentrytitle>
76 <manvolnum>{manvolnum}</manvolnum>
77 <refmiscinfo class="source">Git</refmiscinfo>
78 <refmiscinfo class="version">{git_version}</refmiscinfo>
79 <refmiscinfo class="manual">Git Manual</refmiscinfo>
80 </refmeta>
81 <refnamediv>
82   <refname>{manname}</refname>
83   <refpurpose>{manpurpose}</refpurpose>
84 </refnamediv>
85 endif::backend-docbook[]
86 endif::doctype-manpage[]
88 ifdef::backend-xhtml11[]
89 [linkgit-inlinemacro]
90 <a href="{target}.html">{target}{0?({0})}</a>
91 endif::backend-xhtml11[]