<p>\r
In addition to the number of loose objects and disk\r
space consumed, it reports the number of in-pack\r
- objects, number of packs, and number of objects that can be\r
- removed by running <tt>git prune-packed</tt>.\r
+ objects, number of packs, disk space consumed by those packs,\r
+ and number of objects that can be removed by running\r
+ <tt>git prune-packed</tt>.\r
</p>\r
</dd>\r
</dl></div>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 2008-07-22 09:19:05 UTC\r
+Last updated 2008-08-21 10:34:00 UTC\r
</div>\r
</div>\r
</body>\r
--verbose::
In addition to the number of loose objects and disk
space consumed, it reports the number of in-pack
- objects, number of packs, and number of objects that can be
- removed by running `git prune-packed`.
+ objects, number of packs, disk space consumed by those packs,
+ and number of objects that can be removed by running
+ `git prune-packed`.
Author
<p>\r
When <em>--stdin</em> is specified, the command does not take\r
<tree-ish> arguments from the command line. Instead, it\r
- reads either one <commit> or a list of <commit>\r
- separated with a single space from its standard input.\r
+ reads lines containing either two <tree>, one <commit>, or a\r
+ list of <commit> from its standard input. (Use a single space\r
+ as separator.)\r
</p>\r
-<div class="para"><p>When a single commit is given on one line of such input, it compares\r
-the commit with its parents. The following flags further affects its\r
-behavior. The remaining commits, when given, are used as if they are\r
+<div class="para"><p>When two trees are given, it compares the first tree with the second.\r
+When a single commit is given, it compares the commit with its\r
+parents. The remaining commits, when given, are used as if they are\r
parents of the first commit.</p></div>\r
+<div class="para"><p>When comparing two trees, the ID of both trees (separated by a space\r
+and terminated by a newline) is printed before the difference. When\r
+comparing commits, the ID of the first (or only) commit, followed by a\r
+newline, is printed.</p></div>\r
+<div class="para"><p>The following flags further affects the behavior when comparing\r
+commits (but not trees).</p></div>\r
</dd>\r
<dt>\r
-m\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 2008-08-20 09:13:30 UTC\r
+Last updated 2008-08-21 10:34:00 UTC\r
</div>\r
</div>\r
</body>\r
--stdin::
When '--stdin' is specified, the command does not take
<tree-ish> arguments from the command line. Instead, it
- reads either one <commit> or a list of <commit>
- separated with a single space from its standard input.
+ reads lines containing either two <tree>, one <commit>, or a
+ list of <commit> from its standard input. (Use a single space
+ as separator.)
+
-When a single commit is given on one line of such input, it compares
-the commit with its parents. The following flags further affects its
-behavior. The remaining commits, when given, are used as if they are
+When two trees are given, it compares the first tree with the second.
+When a single commit is given, it compares the commit with its
+parents. The remaining commits, when given, are used as if they are
parents of the first commit.
++
+When comparing two trees, the ID of both trees (separated by a space
+and terminated by a newline) is printed before the difference. When
+comparing commits, the ID of the first (or only) commit, followed by a
+newline, is printed.
++
+The following flags further affects the behavior when comparing
+commits (but not trees).
-m::
By default, 'git-diff-tree --stdin' does not show
</div>\r
<h2>SYNOPSIS</h2>\r
<div class="sectionbody">\r
-<div class="para"><p><em>git merge-base</em> [--all] <commit> <commit></p></div>\r
+<div class="para"><p><em>git merge-base</em> [--all] <commit> <commit>…</p></div>\r
</div>\r
<h2 id="_description">DESCRIPTION</h2>\r
<div class="sectionbody">\r
-<div class="para"><p><em>git-merge-base</em> finds as good a common ancestor as possible between\r
-the two commits. That is, given two commits A and B, <tt>git merge-base A\r
-B</tt> will output a commit which is reachable from both A and B through\r
-the parent relationship.</p></div>\r
-<div class="para"><p>Given a selection of equally good common ancestors it should not be\r
-relied on to decide in any particular way.</p></div>\r
-<div class="para"><p>The <em>git-merge-base</em> algorithm is still in flux - use the source…</p></div>\r
+<div class="para"><p><em>git-merge-base</em> finds best common ancestor(s) between two commits to use\r
+in a three-way merge. One common ancestor is <em>better</em> than another common\r
+ancestor if the latter is an ancestor of the former. A common ancestor\r
+that does not have any better common ancestor than it is a <em>best common\r
+ancestor</em>, i.e. a <em>merge base</em>. Note that there can be more than one\r
+merge bases between two commits.</p></div>\r
+<div class="para"><p>Among the two commits to compute their merge bases, one is specified by\r
+the first commit argument on the command line; the other commit is a\r
+(possibly hypothetical) commit that is a merge across all the remaining\r
+commits on the command line. As the most common special case, giving only\r
+two commits from the command line means computing the merge base between\r
+the given two commits.</p></div>\r
</div>\r
<h2 id="_options">OPTIONS</h2>\r
<div class="sectionbody">\r
</dt>\r
<dd>\r
<p>\r
- Output all common ancestors for the two commits instead of\r
- just one.\r
+ Output all merge bases for the commits, instead of just one.\r
</p>\r
</dd>\r
</dl></div>\r
</div>\r
+<h2 id="_discussion">DISCUSSION</h2>\r
+<div class="sectionbody">\r
+<div class="para"><p>Given two commits <em>A</em> and <em>B</em>, <tt>git merge-base A B</tt> will output a commit\r
+which is reachable from both <em>A</em> and <em>B</em> through the parent relationship.</p></div>\r
+<div class="para"><p>For example, with this topology:</p></div>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt> o---o---o---B\r
+ /\r
+---o---1---o---o---o---A</tt></pre>\r
+</div></div>\r
+<div class="para"><p>the merge base between <em>A</em> and <em>B</em> is <em>1</em>.</p></div>\r
+<div class="para"><p>Given three commits <em>A</em>, <em>B</em> and <em>C</em>, <tt>git merge-base A B C</tt> will compute the\r
+merge base between <em>A</em> and an hypothetical commit <em>M</em>, which is a merge\r
+between <em>B</em> and <em>C</em>. For example, with this topology:</p></div>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt> o---o---o---o---C\r
+ /\r
+ / o---o---o---B\r
+ / /\r
+---2---1---o---o---o---A</tt></pre>\r
+</div></div>\r
+<div class="para"><p>the result of <tt>git merge-base A B C</tt> is <em>1</em>. This is because the\r
+equivalent topology with a merge commit <em>M</em> between <em>B</em> and <em>C</em> is:</p></div>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt> o---o---o---o---o\r
+ / \\r
+ / o---o---o---o---M\r
+ / /\r
+---2---1---o---o---o---A</tt></pre>\r
+</div></div>\r
+<div class="para"><p>and the result of <tt>git merge-base A M</tt> is <em>1</em>. Commit <em>2</em> is also a\r
+common ancestor between <em>A</em> and <em>M</em>, but <em>1</em> is a better common ancestor,\r
+because <em>2</em> is an ancestor of <em>1</em>. Hence, <em>2</em> is not a merge base.</p></div>\r
+<div class="para"><p>When the history involves criss-cross merges, there can be more than one\r
+<em>best</em> common ancestors between two commits. For example, with this\r
+topology:</p></div>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>---1---o---A\r
+ \ /\r
+ X\r
+ / \\r
+---2---o---o---B</tt></pre>\r
+</div></div>\r
+<div class="para"><p>both <em>1</em> and <em>2</em> are merge-base of A and B. Neither one is better than\r
+the other (both are <em>best</em> merge base). When <tt>--all</tt> option is not given,\r
+it is unspecified which best one is output.</p></div>\r
+</div>\r
<h2 id="_author">Author</h2>\r
<div class="sectionbody">\r
<div class="para"><p>Written by Linus Torvalds <torvalds@osdl.org></p></div>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 2008-07-06 05:16:53 UTC\r
+Last updated 2008-08-21 10:34:00 UTC\r
</div>\r
</div>\r
</body>\r
SYNOPSIS
--------
-'git merge-base' [--all] <commit> <commit>
+'git merge-base' [--all] <commit> <commit>...
DESCRIPTION
-----------
-'git-merge-base' finds as good a common ancestor as possible between
-the two commits. That is, given two commits A and B, `git merge-base A
-B` will output a commit which is reachable from both A and B through
-the parent relationship.
+'git-merge-base' finds best common ancestor(s) between two commits to use
+in a three-way merge. One common ancestor is 'better' than another common
+ancestor if the latter is an ancestor of the former. A common ancestor
+that does not have any better common ancestor than it is a 'best common
+ancestor', i.e. a 'merge base'. Note that there can be more than one
+merge bases between two commits.
-Given a selection of equally good common ancestors it should not be
-relied on to decide in any particular way.
-
-The 'git-merge-base' algorithm is still in flux - use the source...
+Among the two commits to compute their merge bases, one is specified by
+the first commit argument on the command line; the other commit is a
+(possibly hypothetical) commit that is a merge across all the remaining
+commits on the command line. As the most common special case, giving only
+two commits from the command line means computing the merge base between
+the given two commits.
OPTIONS
-------
--all::
- Output all common ancestors for the two commits instead of
- just one.
+ Output all merge bases for the commits, instead of just one.
+
+DISCUSSION
+----------
+
+Given two commits 'A' and 'B', `git merge-base A B` will output a commit
+which is reachable from both 'A' and 'B' through the parent relationship.
+
+For example, with this topology:
+
+ o---o---o---B
+ /
+ ---o---1---o---o---o---A
+
+the merge base between 'A' and 'B' is '1'.
+
+Given three commits 'A', 'B' and 'C', `git merge-base A B C` will compute the
+merge base between 'A' and an hypothetical commit 'M', which is a merge
+between 'B' and 'C'. For example, with this topology:
+
+ o---o---o---o---C
+ /
+ / o---o---o---B
+ / /
+ ---2---1---o---o---o---A
+
+the result of `git merge-base A B C` is '1'. This is because the
+equivalent topology with a merge commit 'M' between 'B' and 'C' is:
+
+
+ o---o---o---o---o
+ / \
+ / o---o---o---o---M
+ / /
+ ---2---1---o---o---o---A
+
+and the result of `git merge-base A M` is '1'. Commit '2' is also a
+common ancestor between 'A' and 'M', but '1' is a better common ancestor,
+because '2' is an ancestor of '1'. Hence, '2' is not a merge base.
+
+When the history involves criss-cross merges, there can be more than one
+'best' common ancestors between two commits. For example, with this
+topology:
+
+ ---1---o---A
+ \ /
+ X
+ / \
+ ---2---o---o---B
+
+both '1' and '2' are merge-base of A and B. Neither one is better than
+the other (both are 'best' merge base). When `--all` option is not given,
+it is unspecified which best one is output.
Author
------
<em>git submodule</em> [--quiet] status [--cached] [--] [<path>…]\r
<em>git submodule</em> [--quiet] init [--] [<path>…]\r
<em>git submodule</em> [--quiet] update [--init] [--] [<path>…]\r
-<em>git submodule</em> [--quiet] summary [--summary-limit <n>] [commit] [--] [<path>…]</div></div>\r
+<em>git submodule</em> [--quiet] summary [--summary-limit <n>] [commit] [--] [<path>…]\r
+<em>git submodule</em> [--quiet] foreach <command></div></div>\r
</div>\r
<h2 id="_description">DESCRIPTION</h2>\r
<div class="sectionbody">\r
index or working tree (switched by --cached) are shown.\r
</p>\r
</dd>\r
+<dt>\r
+foreach\r
+</dt>\r
+<dd>\r
+<p>\r
+ Evaluates an arbitrary shell command in each checked out submodule.\r
+ The command has access to the variables $path and $sha1:\r
+ $path is the name of the submodule directory relative to the\r
+ superproject, and $sha1 is the commit as recorded in the superproject.\r
+ Any submodules defined in the superproject but not checked out are\r
+ ignored by this command. Unless given --quiet, foreach prints the name\r
+ of each submodule before evaluating the command.\r
+ A non-zero return from the command in any submodule causes\r
+ the processing to terminate. This can be overridden by adding <em>|| :</em>\r
+ to the end of the command.\r
+</p>\r
+<div class="para"><p>As an example, "git submodule foreach <em>echo $path <tt>git rev-parse HEAD</tt></em> will\r
+show the path and currently checked out commit for each submodule.</p></div>\r
+</dd>\r
</dl></div>\r
</div>\r
<h2 id="_options">OPTIONS</h2>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 2008-07-31 22:10:24 UTC\r
+Last updated 2008-08-21 10:34:01 UTC\r
</div>\r
</div>\r
</body>\r
'git submodule' [--quiet] init [--] [<path>...]
'git submodule' [--quiet] update [--init] [--] [<path>...]
'git submodule' [--quiet] summary [--summary-limit <n>] [commit] [--] [<path>...]
+'git submodule' [--quiet] foreach <command>
DESCRIPTION
in the submodule between the given super project commit and the
index or working tree (switched by --cached) are shown.
+foreach::
+ Evaluates an arbitrary shell command in each checked out submodule.
+ The command has access to the variables $path and $sha1:
+ $path is the name of the submodule directory relative to the
+ superproject, and $sha1 is the commit as recorded in the superproject.
+ Any submodules defined in the superproject but not checked out are
+ ignored by this command. Unless given --quiet, foreach prints the name
+ of each submodule before evaluating the command.
+ A non-zero return from the command in any submodule causes
+ the processing to terminate. This can be overridden by adding '|| :'
+ to the end of the command.
++
+As an example, "git submodule foreach 'echo $path `git rev-parse HEAD`' will
+show the path and currently checked out commit for each submodule.
+
+
OPTIONS
-------
-q::
</li>\r
<li>\r
<p>\r
+<tt>python</tt> suitable for source code in the Python language.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
<tt>ruby</tt> suitable for source code in the Ruby language.\r
</p>\r
</li>\r
<tt>tex</tt> suitable for source code for LaTeX documents.\r
</p>\r
</li>\r
+<li>\r
+<p>\r
+<tt>html</tt> suitable for HTML/XHTML documents.\r
+</p>\r
+</li>\r
</ul></div>\r
<h3 id="_performing_a_three_way_merge">Performing a three-way merge</h3><div style="clear:left"></div>\r
<div class="para"><p>The attribute <tt>merge</tt> affects how three versions of a file is\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 2008-08-13 20:03:51 UTC\r
+Last updated 2008-08-21 10:34:01 UTC\r
</div>\r
</div>\r
</body>\r
- `pascal` suitable for source code in the Pascal/Delphi language.
+- `python` suitable for source code in the Python language.
+
- `ruby` suitable for source code in the Ruby language.
- `tex` suitable for source code for LaTeX documents.
+- `html` suitable for HTML/XHTML documents.
+
Performing a three-way merge
~~~~~~~~~~~~~~~~~~~~~~~~~~~~