Trivial merge rules
===================

This document describes the outcomes of the trivial merge logic in read-tree.

One-way merge
-------------

This replaces the index with a different tree, keeping the stat info
for entries that don't change, and allowing -u to make the minimum
required changes to the working tree to have it match.

Entries marked '+' have stat information. Spaces marked '*' don't
affect the result.

   index   tree    result
   -----------------------
   *       (empty) (empty)
   (empty) tree    tree
   index+  tree    tree
   index+  index   index+

Two-way merge
-------------

It is permitted for the index to lack an entry; this does not prevent
any case from applying.

If the index exists, it is an error for it not to match either the old
or the result.

If multiple cases apply, the one used is listed first.

A result which changes the index is an error if the index is not empty
and not up-to-date.

Entries marked '+' have stat information. Spaces marked '*' don't
affect the result.

 case  index   old     new     result
 -------------------------------------
 0/2   (empty) *       (empty) (empty)
 1/3   (empty) *       new     new
 4/5   index+  (empty) (empty) index+
 6/7   index+  (empty) index   index+
 10    index+  index   (empty) (empty)
 14/15 index+  old     old     index+
 18/19 index+  old     index   index+
 20    index+  index   new     new

Three-way merge
---------------

It is permitted for the index to lack an entry; this does not prevent
any case from applying.

If the index exists, it is an error for it not to match either the
head or (if the merge is trivial) the result.

If multiple cases apply, the one used is listed first.

A result of "no merge"ef="git-config.html">git-config(1)</a>).</p></div>
</dd>
<dt>
--abbrev-commit
</dt>
<dd>
<p>
        Instead of showing the full 40-byte hexadecimal commit object
        name, show only handful hexdigits prefix.  Non default number of
        digits can be specified with "--abbrev=&lt;n&gt;" (which also modifies
        diff output, if it is displayed).
</p>
<div class="para"><p>This should make "--pretty=oneline" a whole lot more readable for
people using 80-column terminals.</p></div>
</dd>
<dt>
--encoding[=&lt;encoding&gt;]
</dt>
<dd>
<p>
        The commit objects record the encoding used for the log message
        in their encoding header; this option can be used to tell the
        command to re-code the commit log message in the encoding
        preferred by the user.  For non plumbing commands this
        defaults to UTF-8.
</p>
</dd>
</dl></div>
</div>
<h2 id="_pretty_formats">PRETTY FORMATS</h2>
<div class="sectionbody">
<div class="para"><p>If the commit is a merge, and if the pretty-format
is not <em>oneline</em>, <em>email</em> or <em>raw</em>, an additional line is
inserted before the <em>Author:</em> line.  This line begins with
"Merge: " and the sha1s of ancestral commits are printed,
separated by spaces.  Note that the listed commits may not
necessarily be the list of the <strong>direct</strong> parent commits if you
have limited your view of history: for example, if you are
only interested in changes related to a certain directory or
file.</p></div>
<div class="para"><p>Here are some additional details for each format:</p></div>
<div class="ilist"><ul>
<li>
<p>
<em>oneline</em>
</p>
<div class="literalblock">
<div class="content">
<pre><tt>&lt;sha1&gt; &lt;title line&gt;</tt></pre>
</div></div>
<div class="para"><p>This is designed to be as compact as possible.</p></div>
</li>
<li>
<p>
<em>short</em>
</p>
<div class="literalblock">
<div class="content">
<pre><tt>commit &lt;sha1&gt;
Author: &lt;author&gt;</tt></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><tt>&lt;title line&gt;</tt></pre>
</div></div>
</li>
<li>
<p>
<em>medium</em>
</p>
<div class="literalblock">
<div class="content">
<pre><tt>commit &lt;sha1&gt;
Author: &lt;author&gt;
Date: &lt;author date&gt;</tt></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><tt>&lt;title line&gt;</tt></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><tt>&lt;full 