Confusion about diffing branches

From: Shawn Bohrer <hidden>
Date: 2016-06-15 22:43:31

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 master

If 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help