git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] fix diff-tree --stdin documentation

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 6, 2008, 05:32 UTC
Message-ID
<7v7iauu2s3.fsf_-_@gitster.siamese.dyndns.org>
In-Reply-To
<7vwsivusy2.fsf@gitster.siamese.dyndns.org>

Long time ago, the feature of "diff-tree --stdin" to take a commit and its parents on one line was broken, and did not support the common:

    git rev-list --parents $commits... -- $paths... |
    git diff-tree --stdin -v -p

usage pattern by Porcelains properly. For diff-tree to talk sensibly about commits, it needs to see commits, not just trees; the code was fixed to take list of commits on the standard input in 1.2.0.

However we left the documentation stale for a long time, until Karl Hasselström finally noticed it very recently.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
diff --git a/Documentation/git-diff-tree.txt b/Documentation/git-diff-tree.txt
index 8c8f35b..1fdf20d 100644
--- a/Documentation/git-diff-tree.txt
+++ b/Documentation/git-diff-tree.txt
@@ -49,13 +49,13 @@ 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 pair of <tree-ish>
+	reads either one <commit> or a list of <commit>
 	separated with a single space from its standard input.
 +
 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.  This does not apply to the case where two <tree-ish>
-separated with a single space are given.
+behavior.  The remaining commits, when given, are used as if they are
+parents of the first commit.
 
 -m::
 	By default, 'git-diff-tree --stdin' does not show
Previous: Junio C HamanoNext: Karl Hasselström
Message 3 of 6 in “[BUG] git diff-tree --stdin doesn't accept two trees”
  1. Karl HasselströmAug 5, 2008
  2. Junio C HamanoAug 5, 2008
  3. fix diff-tree --stdin documentationJunio C Hamano, Aug 6, 2008
  4. Karl HasselströmAug 6, 2008
  5. Karl HasselströmAug 6, 2008
  6. Junio C HamanoAug 6, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.