[--allow-binary-replacement | --binary] [--reject] [-z]\r
[-pNUM] [-CNUM] [--inaccurate-eof] [--recount] [--cached]\r
[--whitespace=<nowarn|warn|fix|error|error-all>]\r
- [--exclude=PATH] [--verbose] [<patch>…]</div></div>\r
+ [--exclude=PATH] [--directory=<root>] [--verbose] [<patch>…]</div></div>\r
</div>\r
<h2 id="_description">DESCRIPTION</h2>\r
<div class="sectionbody">\r
adjusting the hunk headers appropriately).\r
</p>\r
</dd>\r
+<dt>\r
+--directory=<root>\r
+</dt>\r
+<dd>\r
+<p>\r
+ Prepend <root> to all filenames. If a "-p" argument was passed, too,\r
+ it is applied before prepending the new root.\r
+</p>\r
+<div class="para"><p>For example, a patch that talks about updating <tt>a/git-gui.sh</tt> to <tt>b/git-gui.sh</tt>\r
+can be applied to the file in the working tree <tt>modules/git-gui/git-gui.sh</tt> by\r
+running <tt>git apply --directory=modules/git-gui</tt>.</p></div>\r
+</dd>\r
</dl></div>\r
</div>\r
<h2 id="_configuration">Configuration</h2>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 2008-07-06 05:16:34 UTC\r
+Last updated 2008-07-10 02:30:35 UTC\r
</div>\r
</div>\r
</body>\r
[--allow-binary-replacement | --binary] [--reject] [-z]
[-pNUM] [-CNUM] [--inaccurate-eof] [--recount] [--cached]
[--whitespace=<nowarn|warn|fix|error|error-all>]
- [--exclude=PATH] [--verbose] [<patch>...]
+ [--exclude=PATH] [--directory=<root>] [--verbose] [<patch>...]
DESCRIPTION
-----------
by inspecting the patch (e.g. after editing the patch without
adjusting the hunk headers appropriately).
+--directory=<root>::
+ Prepend <root> to all filenames. If a "-p" argument was passed, too,
+ it is applied before prepending the new root.
++
+For example, a patch that talks about updating `a/git-gui.sh` to `b/git-gui.sh`
+can be applied to the file in the working tree `modules/git-gui/git-gui.sh` by
+running `git apply --directory=modules/git-gui`.
+
Configuration
-------------