# "git diff a..b" broken

3 messages from 2006-02-07 to 2006-02-07. Participants: Linus Torvalds, Junio C Hamano.
Thread: https://gitlist.dev/t/3261

## Linus Torvalds, 2006-02-07 18:23

Subject: "git diff a..b" broken
Message-ID: <Pine.LNX.4.64.0602071020120.3854@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0602071020120.3854%40g5.osdl.org

```

There's a funny breakage from the recent "--cc" changes.

If you do 

	git-diff-tree --cc version version2

and "version2" is a merge, it will do something really strange. I haven't 
figured out quite _what_ it does, but it's definitely the wrong thing.

Just a heads up. I'll try to track down what the breakage is.

		Linus

```

## Linus Torvalds, 2006-02-07 18:26

Subject: Re: "git diff a..b" broken
Message-ID: <Pine.LNX.4.64.0602071024270.3854@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0602071024270.3854%40g5.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);
 

```

## Junio C Hamano, 2006-02-07 20:42

Subject: Re: "git diff a..b" broken
Message-ID: <7vfymuvr2t.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vfymuvr2t.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <Pine.LNX.4.64.0602071024270.3854@g5.osdl.org>

```
Linus Torvalds <torvalds@osdl.org> writes:

> Ahh. Very simple.
>
> The "--cc" implies "-p", but without the recursive part.

Thanks.

```
