Skip to content

Draw a subset of the full graph #55

@stdedos

Description

@stdedos

Allow a vararg listing of refspecs, and visualize all n-1 refspecs with regards to the merge-base of the 1st refspec.

Or, in lay-mans terms: I have a main and two branches that were incrementally merged to main. I'd like the subgraph that tracs merge-base of all of the aforementioned refspecs on the bottom, the origin/main on top, and in-between the paths that those branches create with regards to main.

tl;dr:

$ git-graph master A B
 ○<──┐                  cf43da7 (HEAD -> master, origin/master) Merge branch 'A' into 'master'
 ○<┐ │                  ddcfb2d Merge branch 'B' into 'master'
 │ ● │                  bcfb676 (B) ...
 │ │ ●                  019ae78 (A) ,,,
 ├─┴─┘ 
 ○                      9cca380 Merge branch 'X' into 'master'
$

Workarounds considered: git-graph -n 3, but -n 3 is not like git log -3: git-graph simply stops drawing at the 3rd line, instead of parsing+drawing HEAD~3... If you have a branch that's newer than the (origin/)master, then (origin/)master is not even visible

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions