summaryrefslogtreecommitdiffstats
path: root/git-read-tree.html
diff options
context:
space:
mode:
authorJunio C Hamano <junio@kernel.org>2010-03-17 05:41:52 +0000
committerJunio C Hamano <junio@kernel.org>2010-03-17 05:41:52 +0000
commitae2dfa872df1b2af23ea74213d7eb4fae7c25969 (patch)
tree497d8464672f6e7262acc87fc55604688f99ca51 /git-read-tree.html
parentea90ab36bcffba684cc88930450530c859318536 (diff)
downloadgit-htmldocs-ae2dfa872df1b2af23ea74213d7eb4fae7c25969.tar.gz
Autogenerated HTML docs for v1.7.0.2-276-g60daf
Diffstat (limited to 'git-read-tree.html')
-rw-r--r--git-read-tree.html58
1 files changed, 30 insertions, 28 deletions
diff --git a/git-read-tree.html b/git-read-tree.html
index e1d772b4f..2694dff0c 100644
--- a/git-read-tree.html
+++ b/git-read-tree.html
@@ -511,7 +511,7 @@ provided.</p></div>
<h3 id="_single_tree_merge">Single Tree Merge</h3><div style="clear:left"></div>
<div class="para"><p>If only 1 tree is specified, <em>git read-tree</em> operates as if the user did not
specify <tt>-m</tt>, except that if the original index has an entry for a
-given pathname, and the contents of the path matches with the tree
+given pathname, and the contents of the path match with the tree
being read, the stat info from the index is used. (In other words, the
index's stat()s take precedence over the merged tree's).</p></div>
<div class="para"><p>That means that if you do a <tt>git read-tree -m &lt;newtree&gt;</tt> followed by a
@@ -530,7 +530,7 @@ the following:</p></div>
<li>
<p>
The current index and work tree is derived from $H, but
- the user may have local changes in them since $H;
+ the user may have local changes in them since $H.
</p>
</li>
<li>
@@ -541,32 +541,34 @@ The user wants to fast-forward to $M.
</ol></div>
<div class="para"><p>In this case, the <tt>git read-tree -m $H $M</tt> command makes sure
that no local change is lost as the result of this "merge".
-Here are the "carry forward" rules:</p></div>
+Here are the "carry forward" rules, where "I" denotes the index,
+"clean" means that index and work tree coincide, and "exists"/"nothing"
+refer to the presence of a path in the specified commit:</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt> I (index) H M Result
- -------------------------------------------------------
-0 nothing nothing nothing (does not happen)
-1 nothing nothing exists use M
-2 nothing exists nothing remove path from index
-3 nothing exists exists, use M if "initial checkout"
- H == M keep index otherwise
- exists fail
- H != M</tt></pre>
+<pre><tt> I H M Result
+ -------------------------------------------------------
+0 nothing nothing nothing (does not happen)
+1 nothing nothing exists use M
+2 nothing exists nothing remove path from index
+3 nothing exists exists, use M if "initial checkout",
+ H == M keep index otherwise
+ exists, fail
+ H != M</tt></pre>
</div></div>
<div class="literalblock">
<div class="content">
-<pre><tt> clean I==H I==M
- ------------------
-4 yes N/A N/A nothing nothing keep index
-5 no N/A N/A nothing nothing keep index</tt></pre>
+<pre><tt> clean I==H I==M
+ ------------------
+4 yes N/A N/A nothing nothing keep index
+5 no N/A N/A nothing nothing keep index</tt></pre>
</div></div>
<div class="literalblock">
<div class="content">
-<pre><tt>6 yes N/A yes nothing exists keep index
-7 no N/A yes nothing exists keep index
-8 yes N/A no nothing exists fail
-9 no N/A no nothing exists fail</tt></pre>
+<pre><tt>6 yes N/A yes nothing exists keep index
+7 no N/A yes nothing exists keep index
+8 yes N/A no nothing exists fail
+9 no N/A no nothing exists fail</tt></pre>
</div></div>
<div class="literalblock">
<div class="content">
@@ -577,7 +579,7 @@ Here are the "carry forward" rules:</p></div>
</div></div>
<div class="literalblock">
<div class="content">
-<pre><tt> clean (H=M)
+<pre><tt> clean (H==M)
------
14 yes exists exists keep index
15 no exists exists keep index</tt></pre>
@@ -594,24 +596,24 @@ Here are the "carry forward" rules:</p></div>
21 no yes no exists exists fail</tt></pre>
</div></div>
<div class="para"><p>In all "keep index" cases, the index entry stays as in the
-original index file. If the entry were not up to date,
+original index file. If the entry is not up to date,
<em>git read-tree</em> keeps the copy in the work tree intact when
operating under the -u flag.</p></div>
<div class="para"><p>When this form of <em>git read-tree</em> returns successfully, you can
-see what "local changes" you made are carried forward by running
+see which of the "local changes" that you made were carried forward by running
<tt>git diff-index --cached $M</tt>. Note that this does not
-necessarily match <tt>git diff-index --cached $H</tt> would have
+necessarily match what <tt>git diff-index --cached $H</tt> would have
produced before such a two tree merge. This is because of cases
18 and 19 --- if you already had the changes in $M (e.g. maybe
you picked it up via e-mail in a patch form), <tt>git diff-index
--cached $H</tt> would have told you about the change before this
merge, but it would not show in <tt>git diff-index --cached $M</tt>
-output after two-tree merge.</p></div>
-<div class="para"><p>Case #3 is slightly tricky and needs explanation. The result from this
+output after the two-tree merge.</p></div>
+<div class="para"><p>Case 3 is slightly tricky and needs explanation. The result from this
rule logically should be to remove the path if the user staged the removal
of the path and then switching to a new branch. That however will prevent
the initial checkout from happening, so the rule is modified to use M (new
-tree) only when the contents of the index is empty. Otherwise the removal
+tree) only when the content of the index is empty. Otherwise the removal
of the path is kept as long as $H and $M are the same.</p></div>
<h3 id="_3_way_merge">3-Way Merge</h3><div style="clear:left"></div>
<div class="para"><p>Each "index" entry has two bits worth of "stage" state. stage 0 is the
@@ -827,7 +829,7 @@ support.</p></div>
</div>
<div id="footer">
<div id="footer-text">
-Last updated 2010-02-13 00:59:52 UTC
+Last updated 2010-03-17 05:41:36 UTC
</div>
</div>
</body>