git-big-picture / git-big-picture

:octopus: Git — the big picture

Home Page:https://pypi.org/project/git-big-picture/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Request: vertical (sideways) graph

cxw42 opened this issue · comments

Thank you for this tool, which is very useful! I have one repo with about 20 branches, so the graph is very wide. Would it be possible to request a mode in which arrows to parents point left, and branches are stacked vertically? That would give me a tall, skinny image instead of a short, wide image. Text would still be left to right. My apologies if this has already been implemented and I missed it in the documentation. Thank you for considering this request!

One possible implementation in the shell is:

git-big-picture --graphviz | sed -e '1arankdir=RL;' | dot -Tpng -o graph.png

This produces the style I am looking for.

I guess it sounds doable, perhaps. I'd be open to accepting a pull-request that implements this change. @cxw42 how do you envision this to be implemented at the command-line / user-interface level?

@esc Thanks for responding! The easiest for me would be a --sideways output option.

Others might want top-to-bottom or right-to-left. To support all four directions, we could add a --grow=<up|down|left|right> option specifying how the graph moves forward in time. The default is --grow=up, and my use case is --grow=right.

What do you think?

I think it' a great Idea and I will happily review a pull-request in that direction

@cxw42 please feel invited for review at #59