Confusion about diffing branches
- From
Shawn Bohrer <shawn.bohrer@gmail.com>
- Date
- Aug 26, 2007, 23:35 UTC
- Message-ID
- <20070826233555.GA7422@mediacenter.austin.rr.com>
So I imagine I'm missing something, or perhaps I'm just looking at this from the wrong perspective, but here is what I'm seeing. Lets say I have something like:
A---B topic
/
C---D---E masterIf I want to see a diff of all of the changes between the two branches I can say:
git diff master topic
Which shows me the combined diff of commits A, B and E. That is exactly what I would expect however, I would expect that equivalently I could say:
git diff master...topic
to see all commits reachable from topic and master but not both. However, this doesn't do what I expect but instead only shows me the combined diff of A and B. Likewise:
git diff topic...master
Shows me the diff of E. Am I crazy or isn't this supposed to be the behavior of the topic..master notation? Strangely enough running either
git diff master..topic git diff topic..master
both show me the diff of A, B and E, which is what I would expect from the master...topic notation. Am I the only one who thinks this is backwards? The same experiment using git log shows me what I would expect so somehow I think I'm missing something.