Have you checked how many merge bases there are for the two branches?

It is possible in complex criss-cross merge scenarios to have multiple merge 
bases. IIUC this may give different results for the double dot case depending 
on which of the merge-bases was used. I could well be wrong. But it is worth 
checking so that you can see the history.

Also try 'gitk' but passing in the ref limits so as to limit the display tree.

Philip
  ----- Original Message ----- 
  From: Chris Murphy 
  To: Git for human beings 
  Sent: Monday, August 07, 2017 4:28 PM
  Subject: [git-users] git log "double dot" showing a false positive?


  Hi,


  My understanding is that the command
  git log branchA..branchB


  should return the commits reachable via branchB that are not reachable via 
branchA


  I use this command a lot and have never noticed an issue, until now. 


  I have the following example:


  ± % git --version
  git version 2.13.0


   % git log branchA..branchB | grep 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc
  commit 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc


  ± % git log branchA | grep 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc
  commit 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc


  ± % git log branchB | grep 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc
  commit 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc


  ± % git branch --contains 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc | grep 
"branchA\|branchB"
  * branchA
    branchB


  ± % git log --left-right branchA...branchB | grep 
9ba8f06829b2d2170f23254ed3fe8f3727fe56dc
  commit > 9ba8f06829b2d2170f23254ed3fe8f3727fe56dc


  I believe that is an incorrect result for the double dot syntax.


  The history of the repo is quite tangled with many merges, but I uploaded it 
here (with sensitive info removed, sorry, it's a repo for my work) in case it 
helps:
  https://gist.github.com/cmurphycode/a75d7c4616a93be2bb4fd1096d162714





  Any hints are appreciated.


  Thanks!



  -- 
  You received this message because you are subscribed to the Google Groups 
"Git for human beings" group.
  To unsubscribe from this group and stop receiving emails from it, send an 
email to git-users+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to