I've been looking for a method to check whether one commit is reachable
from another via first-parent traverse (without traversing tree manually)
and I've stumbled into strange git rev-parse behavior.
Imagine following git tree:
In this tree commit B is the first parent of C.
1. How do I check whether B or E are reachable from C by first parent?
*git rev-list --first-parent B..C *and *git rev-list --first-parent E..C*
both return SHA of C
2. The issue I'm reporting is that *git rev-list --first-parent
--ancestry-path* seems to behave wrong:
*git rev-list --first-parent --ancestry-path E..C* returns SHA of C, while
(according to *man git rev-parse)* "--ancestry-path" should restrict
command output to commits being both descendants of E and ancestors of C.
*git rev-list --first-parent --ancestry-path E^..C* returns zero commits
which is correct.
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
For more options, visit https://groups.google.com/d/optout.