This kind of operation is based on the concept of the revision range described in detail in the SO question: " The difference is 'git log origin / master vs' git log origin / master .. ".
git rev-list should be able to return from commit to another, if possible.
Therefore, I would try:
git rev-list --boundary 85e54e2408..0815fcf18a 0815fcf18a19441c1c26fc3495c4047cf59a06b9 8a1658147a460a0230fb1990f0bc61130ab624b2 -85e54e240836e6efb46978e4a1780f0b45516b20
(Boundary commits have a prefix - )
If the last commit is displayed in the same way as the first commit in the git rev-list command, then this commit is reachable from the second commit.
If the first commit is not available for the second, git rev-list should not return anything.
git rev-list
will end in A if A reachable from B
This is the same as:
git rev-list --boundary B --not A
with B a positive link and A a negative link .
It will start at B and go through the schedule until it encounters the revision available from A
I would say that if A is directly accessible from B , it will meet (and display because of the --boundary option) A
VonC Jun 09 '10 at 13:10 2010-06-09 13:10
source share