-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to pin commit graph branch order #10217
Comments
Yes, about commit graph. There is no point in the existence of the commit graph when branch ordering is absent. The same goes for color choice. It should be possible to pin the branch color. |
Pinning the color is difficult - fundamentally we don't get any identifier for these flows so we cannot simply set a color for them based on their identifier. Even if we parse the flows on the server, we can't guarantee the same colors - we would need to come up with some unique identifier for a flow: [from commit, to commit, ending as a commit?] is the only identifier I can think of but without the whole graph you can't assign those. I guess if we switch from drawing and generating the flows in a single pass to creating flow objects that have all the co-ordinates and symbols that represent the flow - we can then assign the flows colors more easily. Then we can store and pass the colors that go over the page - however if you get a commit in the interim that is likely to bugger up the coloring I guess the pages would have to have to have a last commitid - but then things like https://try.gitea.io/ahaha/glu/graph around 51e429e which doesn't have a commitid might cause trouble if it is on a page edge. The flow generating code at present presumes a bottom up generation of flows - it would be possible to switch this round to parse from top to bottom - but I suspect that is not going to get us far. hmm... I think storing the full graph on the flows would be helpful in any case because then you could do things like highlight all the commits on a flow. It should be noted that a flow is not a git branch - a git branch is simply a pointer to a commit - and the mainline history of a branch isn't stored in any way - in that given two parents of a git commit I there is no information as to which was previously labelled the head of the branch. In this graph coloring scheme we always choose the color of the most leftmost flow in to a node - we could equally choose the most right-hand but then the most left-hand flow would always be changing color as things are merged into it. |
If branch name can not be used for flow color, I suggest a static set of color assigned left-to-right. For example, 16 colors generated using https://medialab.github.io/iwanthue/: light (for dark theme):
dark (for light theme):
Note the example colors don't match in light/dark. Probably better to define them in |
How I can to pin master - final - dev - etc branches from left to right? It is very discourages when branches is dancing.
The text was updated successfully, but these errors were encountered: