mhutchie / vscode-git-graph

View a Git Graph of your repository in Visual Studio Code, and easily perform Git actions from the graph.
https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph
Other
1.97k stars 261 forks source link

Recognize Git-Flow when drawing lines #766

Open MaximilianHxrn opened 1 year ago

MaximilianHxrn commented 1 year ago

We use 90% of Git-Flow in our company (we dont use tags in some projects) which leads to the following problem:

My current understanding is, that every new commit is fitted as far left as possible and if needed is pushed one column to the right. image

If we apply this logic to GitFlow it looks like this: image Blue line: master Green line: develop Pink line: release/2 // 2 is an example name as i am not allowed to disclose the real branch name Purple line: release/1 Orange line: feature/1

My request would be that the purple line is in the same column as the pink line. So its:
master
release/2
release/2
develop
feature/*
master
release/1
release/1
develop
master

I am open to suggestions on how to implement it and if neccessary I can contribute with my non-existent TS-skills

LaurentErnes commented 2 months ago

Automatic parsing of a git graph is a posteriori difficult because branch references are volatile and you don't have branches associated with each commits as in mercurial. So, to help git find back which commit belongs to which branch (or git-flow swimlanes), I would propose to have the users annotate some commits (because they know it best) and this info would be kept somewhere (in repo ?). Then a proper graph could be created; something along Plastic SCM view described in this discussion https://github.com/mhutchie/vscode-git-graph/issues/207