summaryrefslogtreecommitdiffstats
path: root/git-rev-parse.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-07-01 14:31:18 -0700
committerJunio C Hamano <gitster@pobox.com>2013-07-01 14:31:18 -0700
commita195230280e159899bd277641eb24efa7c6d1603 (patch)
tree2b871f83080d996813ed0b6914fe3b88c35f6b08 /git-rev-parse.html
parent1b5a38274423dd3999d7f8d89c77c5a601686166 (diff)
downloadgit-htmldocs-a195230280e159899bd277641eb24efa7c6d1603.tar.gz
Autogenerated HTML docs for v1.8.3.2-701-g8c4e4ec
Diffstat (limited to 'git-rev-parse.html')
-rw-r--r--git-rev-parse.html22
1 files changed, 21 insertions, 1 deletions
diff --git a/git-rev-parse.html b/git-rev-parse.html
index f909fa2b1..0726d7665 100644
--- a/git-rev-parse.html
+++ b/git-rev-parse.html
@@ -847,6 +847,26 @@ distinguish between them.</p></div>
</p>
</dd>
<dt class="hdlist1">
+--prefix &lt;arg&gt;
+</dt>
+<dd>
+<p>
+ Behave as if <em>git rev-parse</em> was invoked from the <code>&lt;arg&gt;</code>
+ subdirectory of the working tree. Any relative filenames are
+ resolved as if they are prefixed by <code>&lt;arg&gt;</code> and will be printed
+ in that form.
+</p>
+<div class="paragraph"><p>This can be used to convert arguments to a command run in a subdirectory
+so that they can still be used after moving to the top-level of the
+repository. For example:</p></div>
+<div class="listingblock">
+<div class="content">
+<pre><code>prefix=$(git rev-parse --show-prefix)
+cd "$(git rev-parse --show-toplevel)"
+eval "set -- $(git rev-parse --sq --prefix "$prefix" "$@")"</code></pre>
+</div></div>
+</dd>
+<dt class="hdlist1">
--verify
</dt>
<dd>
@@ -1704,7 +1724,7 @@ Similar to above:
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Last updated 2013-04-21 19:25:38 PDT
+Last updated 2013-07-01 14:29:27 PDT
</div>
</div>
</body>