For a research project, I've been trying to replicate the graph view present in version control software like SourceTree or TortoiseGit.
The graph view I'm trying to implement
The biggest problem I'm having is finding what branch a commit belongs to. If I have this, I can assign the commit dot a column and a color. This is difficult because under the hood, Git doesn't store the branch the commit was initially on.
Looking at other solutions on StackOverflow, I found it is possible to get a list of branches that contain the commit, but I need a method of isolating a single one to display in my graph. In the same way SourceTree or TortoiseGit somehow manage to do it.
My problem is also identical to this one, Find out the branch a commit belongs to in LibGit2Sharp?
It looks like they discovered the actual solution in a private discussion room. However, I don't have the reputation to comment and ask what they found.
Does anyone have any ideas on how I could do this?
Or, @nulltoken if by chance you see this and remember, do you know what you guys discovered in that discussion room?