Documentation / asciidoc.confon commit update-index: teach --cacheinfo a new syntax "mode,sha1,path" (ec160ae)
   1## linkgit: macro
   2#
   3# Usage: linkgit:command[manpage-section]
   4#
   5# Note, {0} is the manpage section, while {target} is the command.
   6#
   7# Show Git link as: <command>(<section>); if section is defined, else just show
   8# the command.
   9
  10[macros]
  11(?su)[\\]?(?P<name>linkgit):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
  12
  13[attributes]
  14asterisk=&#42;
  15plus=&#43;
  16caret=&#94;
  17startsb=&#91;
  18endsb=&#93;
  19backslash=&#92;
  20tilde=&#126;
  21apostrophe=&#39;
  22backtick=&#96;
  23litdd=&#45;&#45;
  24
  25ifdef::backend-docbook[]
  26[linkgit-inlinemacro]
  27{0%{target}}
  28{0#<citerefentry>}
  29{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
  30{0#</citerefentry>}
  31endif::backend-docbook[]
  32
  33ifdef::backend-docbook[]
  34ifndef::git-asciidoc-no-roff[]
  35# "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
  36# v1.72 breaks with this because it replaces dots not in roff requests.
  37[listingblock]
  38<example><title>{title}</title>
  39<literallayout class="monospaced">
  40ifdef::doctype-manpage[]
  41&#10;.ft C&#10;
  42endif::doctype-manpage[]
  43|
  44ifdef::doctype-manpage[]
  45&#10;.ft&#10;
  46endif::doctype-manpage[]
  47</literallayout>
  48{title#}</example>
  49endif::git-asciidoc-no-roff[]
  50
  51ifdef::git-asciidoc-no-roff[]
  52ifdef::doctype-manpage[]
  53# The following two small workarounds insert a simple paragraph after screen
  54[listingblock]
  55<example><title>{title}</title>
  56<literallayout class="monospaced">
  57|
  58</literallayout><simpara></simpara>
  59{title#}</example>
  60
  61[verseblock]
  62<formalpara{id? id="{id}"}><title>{title}</title><para>
  63{title%}<literallayout{id? id="{id}"}>
  64{title#}<literallayout>
  65|
  66</literallayout>
  67{title#}</para></formalpara>
  68{title%}<simpara></simpara>
  69endif::doctype-manpage[]
  70endif::git-asciidoc-no-roff[]
  71endif::backend-docbook[]
  72
  73ifdef::doctype-manpage[]
  74ifdef::backend-docbook[]
  75[header]
  76template::[header-declarations]
  77<refentry>
  78<refmeta>
  79<refentrytitle>{mantitle}</refentrytitle>
  80<manvolnum>{manvolnum}</manvolnum>
  81<refmiscinfo class="source">Git</refmiscinfo>
  82<refmiscinfo class="version">{git_version}</refmiscinfo>
  83<refmiscinfo class="manual">Git Manual</refmiscinfo>
  84</refmeta>
  85<refnamediv>
  86  <refname>{manname}</refname>
  87  <refpurpose>{manpurpose}</refpurpose>
  88</refnamediv>
  89endif::backend-docbook[]
  90endif::doctype-manpage[]
  91
  92ifdef::backend-xhtml11[]
  93[attributes]
  94git-relative-html-prefix=
  95[linkgit-inlinemacro]
  96<a href="{git-relative-html-prefix}{target}.html">{target}{0?({0})}</a>
  97endif::backend-xhtml11[]