<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\r
<head>\r
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
-<meta name="generator" content="AsciiDoc 7.0.1" />\r
+<meta name="generator" content="AsciiDoc 7.0.2" />\r
<style type="text/css">\r
/* Debug borders */\r
p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {\r
<div class="sectionbody">\r
<div class="verseblock">\r
<div class="content"><em>git-checkout-index</em> [-u] [-q] [-a] [-f] [-n] [--prefix=<string>]\r
- [--stage=<number>] [--] <file>…</div></div>\r
+ [--stage=<number>|all]\r
+ [--temp]\r
+ [-z] [--stdin]\r
+ [--] [<file>]*</div></div>\r
</div>\r
<h2>DESCRIPTION</h2>\r
<div class="sectionbody">\r
</p>\r
</dd>\r
<dt>\r
---stage=<number>\r
+--stage=<number>|all\r
</dt>\r
<dd>\r
<p>\r
Instead of checking out unmerged entries, copy out the\r
files from named stage. <number> must be between 1 and 3.\r
+ Note: --stage=all automatically implies --temp.\r
+</p>\r
+</dd>\r
+<dt>\r
+--temp\r
+</dt>\r
+<dd>\r
+<p>\r
+ Instead of copying the files to the working directory\r
+ write the content to temporary files. The temporary name\r
+ associations will be written to stdout.\r
+</p>\r
+</dd>\r
+<dt>\r
+--stdin\r
+</dt>\r
+<dd>\r
+<p>\r
+ Instead of taking list of paths from the command line,\r
+ read list of paths from the standard input. Paths are\r
+ separated by LF (i.e. one path per line) by default.\r
+</p>\r
+</dd>\r
+<dt>\r
+-z\r
+</dt>\r
+<dd>\r
+<p>\r
+ Only meaningful with <tt>--stdin</tt>; paths are separated with\r
+ NUL character instead of LF.\r
</p>\r
</dd>\r
<dt>\r
</div></div>\r
<p>which will force all existing <tt>*.h</tt> files to be replaced with their\r
cached copies. If an empty command line implied "all", then this would\r
-force-refresh everything in the index, which was not the point.</p>\r
+force-refresh everything in the index, which was not the point. But\r
+since git-checkout-index accepts --stdin it would be faster to use:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ find . -name '*.h' -print0 | git-checkout-index -f -z --stdin</tt></pre>\r
+</div></div>\r
<p>The <tt>--</tt> is just a good idea when you know the rest will be filenames;\r
it will prevent problems with a filename of, for example, <tt>-a</tt>.\r
Using <tt>--</tt> is probably a good policy in scripts.</p>\r
</div>\r
+<h2>Using --temp or --stage=all</h2>\r
+<div class="sectionbody">\r
+<p>When <tt>--temp</tt> is used (or implied by <tt>--stage=all</tt>)\r
+<tt>git-checkout-index</tt> will create a temporary file for each index\r
+entry being checked out. The index will not be updated with stat\r
+information. These options can be useful if the caller needs all\r
+stages of all unmerged entries so that the unmerged files can be\r
+processed by an external merge tool.</p>\r
+<p>A listing will be written to stdout providing the association of\r
+temporary file names to tracked path names. The listing format\r
+has two variations:</p>\r
+<ol>\r
+<li>\r
+<p>\r
+tempname TAB path RS\r
+</p>\r
+<p>The first format is what gets used when <tt>--stage</tt> is omitted or\r
+is not <tt>--stage=all</tt>. The field tempname is the temporary file\r
+name holding the file content and path is the tracked path name in\r
+the index. Only the requested entries are output.</p>\r
+</li>\r
+<li>\r
+<p>\r
+stage1temp SP stage2temp SP stage3tmp TAB path RS\r
+</p>\r
+<p>The second format is what gets used when <tt>--stage=all</tt>. The three\r
+stage temporary fields (stage1temp, stage2temp, stage3temp) list the\r
+name of the temporary file if there is a stage entry in the index\r
+or <tt>.</tt> if there is no stage entry. Paths which only have a stage 0\r
+entry will always be omitted from the output.</p>\r
+</li>\r
+</ol>\r
+<p>In both formats RS (the record separator) is newline by default\r
+but will be the null byte if -z was passed on the command line.\r
+The temporary file names are always safe strings; they will never\r
+contain directory separators or whitespace characters. The path\r
+field is always relative to the current directory and the temporary\r
+file names are always relative to the top level directory.</p>\r
+<p>If the object being copied out to a temporary file is a symbolic\r
+link the content of the link will be written to a normal file. It is\r
+up to the end-user or the Porcelain to make use of this information.</p>\r
+</div>\r
<h2>EXAMPLES</h2>\r
<div class="sectionbody">\r
<dl>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 06-Jan-2006 17:12:07 PDT\r
+Last updated 07-Mar-2006 05:16:20 UTC\r
</div>\r
</div>\r
</body>\r