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

Re: "git diff a..b" broken

From
Linus Torvalds <torvalds@osdl.org>
Date
Feb 7, 2006, 18:26 UTC
Message-ID
<Pine.LNX.4.64.0602071024270.3854@g5.osdl.org>
In-Reply-To
<Pine.LNX.4.64.0602071020120.3854@g5.osdl.org>
On Tue, 7 Feb 2006, Linus Torvalds wrote:
> 
> Just a heads up. I'll try to track down what the breakage is.
Ahh. Very simple.
The "--cc" implies "-p", but without the recursive part.
		Linus
----
diff --git a/diff-tree.c b/diff-tree.c
index f3280a1..7148323 100644
--- a/diff-tree.c
+++ b/diff-tree.c
@@ -284,14 +284,15 @@ int main(int argc, const char **argv)
 		}
 		usage(diff_tree_usage);
 	}
-	if (diff_options.output_format == DIFF_FORMAT_PATCH)
-		diff_options.recursive = 1;
 
 	if (combine_merges) {
 		diff_options.output_format = DIFF_FORMAT_PATCH;
 		ignore_merges = 0;
 	}
 
+	if (diff_options.output_format == DIFF_FORMAT_PATCH)
+		diff_options.recursive = 1;
+
 	diff_tree_setup_paths(get_pathspec(prefix, argv));
 	diff_setup_done(&diff_options);
 
Previous: Linus TorvaldsNext: Junio C Hamano
Message 2 of 3 in “"git diff a..b" broken”
  1. Linus TorvaldsFeb 7, 2006
  2. Linus TorvaldsFeb 7, 2006
  3. Junio C HamanoFeb 7, 2006

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.