summaryrefslogtreecommitdiffstats
path: root/git-rev-parse.html
diff options
context:
space:
mode:
authorJunio C Hamano <junio@kernel.org>2010-08-03 15:15:54 +0000
committerJunio C Hamano <junio@kernel.org>2010-08-03 15:15:54 +0000
commita978876a665cbf17575e06e27f29c77326621c09 (patch)
treee5a708f860ea4caf83f8d08d68c88781f3b87163 /git-rev-parse.html
parent8ac9d8afca61866e40b7c3bac22175b842e66aa3 (diff)
downloadgit-htmldocs-a978876a665cbf17575e06e27f29c77326621c09.tar.gz
Autogenerated HTML docs for v1.7.2.1-22-ge7bdd
Diffstat (limited to 'git-rev-parse.html')
-rw-r--r--git-rev-parse.html8
1 files changed, 5 insertions, 3 deletions
diff --git a/git-rev-parse.html b/git-rev-parse.html
index c60476788..a57608ad6 100644
--- a/git-rev-parse.html
+++ b/git-rev-parse.html
@@ -918,9 +918,11 @@ F^! D G H D F</tt></pre>
scripts the same facilities C builtins have. It works as an option normalizer
(e.g. splits single switches aggregate values), a bit like <tt>getopt(1)</tt> does.</p></div>
<div class="para"><p>It takes on the standard input the specification of the options to parse and
-understand, and echoes on the standard output a line suitable for <tt>sh(1)</tt> <tt>eval</tt>
+understand, and echoes on the standard output a string suitable for <tt>sh(1)</tt> <tt>eval</tt>
to replace the arguments with normalized ones. In case of error, it outputs
usage on the standard error stream, and exits with code 129.</p></div>
+<div class="para"><p>Note: Make sure you quote the result when passing it to <tt>eval</tt>. See
+below for an example.</p></div>
<h3 id="_input_format">Input Format</h3><div style="clear:left"></div>
<div class="para"><p><em>git rev-parse --parseopt</em> input format is fully text based. It has two parts,
separated by a line that contains only <tt>--</tt>. The lines before the separator
@@ -997,7 +999,7 @@ bar= some cool option --bar with an argument
An option group Header
C? option C with an optional argument"
-eval `echo "$OPTS_SPEC" | git rev-parse --parseopt -- "$@" || echo exit $?`</tt></pre>
+eval "$(echo "$OPTS_SPEC" | git rev-parse --parseopt -- "$@" || echo exit $?)"</tt></pre>
</div></div>
</div>
<h2 id="_sq_quote">SQ-QUOTE</h2>
@@ -1072,7 +1074,7 @@ Junio C Hamano &lt;gitster@pobox.com&gt; and Pierre Habouzit &lt;madcoder@debian
</div>
<div id="footer">
<div id="footer-text">
-Last updated 2010-07-21 21:55:35 UTC
+Last updated 2010-08-03 15:15:33 UTC
</div>
</div>
</body>