Looking for commits A(master), C(0.1), K(0.1.1) and O(0.2).
A - B - D - F - G <- "master" branch (at G)
\ \
\ C - E --M <- "0.1" branch (still at E)
\ \
\ K - L <- "0.1.1" branch (still at L)
\
O - P - F <- "0.2" branch (still at F)
How can detect this commits by scripts without user data about parent branch. In other words, how to determine the first commit (A, O, C, K), belongs to a particular branch, knowing only the name of this branch?