I've got following history in git:
* 02e085a (master) readme update
| * 1d940da (HEAD -> b1) search.py
| | * 7aaa12d (b2) file2
| |/
| * 7be9db9 file1
|/
* 22601c0 initial commit
Now I'm on b2 and I would like to get the point, where b2 branched off (7be9db9). The algo is following:
- get next commit
- check branches the commit belongs to
- if only current branch, continue with 1. step else 4.step
- the commit belongs to multiple branches, this must be the point, where we branched off
However, if I want to do the same for b1, I end up at the same position - 7be9db9. But I would expect to end up at 22601c0, as this was the point, where b1 branched off. The history has been created like this.
initial commit branch from master (b1) and commit file1 branch from b1 (b2) and commit file2 checkout b1 and commit search.py
I'm afraid the way git is designed, it's not possible to distinguish, whether commit 7be9db9 (file1) has been created by b1 or b2, am I correct? So it's not possible to say, whether the parent of b1 is master or b2?
Thanks for confirmation.