diff options
author | Karl Hasselström <kha@treskal.com> | 2008-08-10 18:12:58 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-08-11 01:35:47 -0700 |
commit | 140b378d07229e3bcef0613e11aa0a04e4db3ecf (patch) | |
tree | cf495414d9322aa8a1916560f1d74ae75687faa9 /Documentation | |
parent | 7cccfaa2809a09cb321a5f1276c5b91a71594527 (diff) | |
download | git-140b378d07229e3bcef0613e11aa0a04e4db3ecf.tar.gz git-140b378d07229e3bcef0613e11aa0a04e4db3ecf.tar.xz |
Teach git diff-tree --stdin to diff trees
When feeding trees on the command line, you can give exactly two
trees, not three nor one; --stdin now supports this "two tree" form on
its input, in addition to accepting lines with one or more commits.
When diffing trees (either specified on the command line or from the
standard input), the -s, -v, --pretty, --abbrev-commit, --encoding,
--no-commit-id, and --always options are ignored, since they do not
apply to trees; and the -m, -c, and --cc options are ignored since
they would be meaningful only with three or more trees, which is not
supported (yet).
Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-diff-tree.txt | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Documentation/git-diff-tree.txt b/Documentation/git-diff-tree.txt index 1f4b91ed4..5d48664e6 100644 --- a/Documentation/git-diff-tree.txt +++ b/Documentation/git-diff-tree.txt @@ -49,17 +49,22 @@ include::diff-options.txt[] --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 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. + -The ID of the first (or only) commit, followed by a newline, is -printed before the differences. +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 its behavior. +The following flags further affects the behavior when comparing +commits (but not trees). -m:: By default, 'git-diff-tree --stdin' does not show |