With long branch names, corresponding remote branches use too much space on the same history graph row, prevent seeing the commit message
The problem
Particularly with long branch names, the fact that Gitg shows the remote and local branches next to each other when they are "aligned" on the same commit… is problematic:
…because it pushes the commit message away to the right, while showing redundant information (when the branch names are the same remotely vs locally).
This gets really problematic when you need to use descriptive/long branch names to differentiate a bunch of them addressing specific parts of a codebase, as you can see here:
Can we find a way to make this compact and make it possible to read the commit message at all times?
Some potential solutions
We could save a ton of precious horizontal space if we detected this situation and somehow hid the redundant parts.
One potential approach could be to combine the colored bubbles into a "split colored bubble". Something like this:
Some potential caveats with that approach:
- Of course this assumption goes out of the window if there is more than one remote with copies of your local branch, but in that case we can just keep doing what we used to do (i.e. show them all, like on the 2nd line of the screenshots above). Or… we could truncate them (see also the alternative approach below).
- Some people might not like seeing pills with split colors.
Another potential approach I can think of, which would be easier to implement, could be to ellipsize the branch name's from the green remote bubble(s) when associated with a local branch that has the exact same name, while keeping the green and blue bubbles separate widgets.
- It could have an ellipsis character (
…
), so naming itmy_remote/…
instead ofmy_remote/very_long_branch_name
- A GtkTooltip on hover could also reveal the full traditional "remote_name/very_long_branch_name" content. The tooltip could also mention that the local
very_long_branch_name
branch is trackingorigin/very_long_branch_name
, while we're at it. - It would even be possible to trim multiple green labels this way.