lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

Add marker/icon to branches without an upstream

Open thislooksfun opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe. I juggle a lot of branches at a time. One thing that is important to me is to be able to tell easily what state a branch is in. Namely is it:

  • untracked (local only, no corresponding remote branch)
  • synced with remote (has remote branch that it has not diverged from in either direction)
  • ahead/behind remote
  • merged (in sync with the main branch in a way that the lazygit delete flow doesn't prompt with "not fully merged")

With lazygit 0.44.1 I can (fairly) easily tell if a branch is ahead/behind (yellow down/up arrows), I can really easily tell if is merged (big red "upstream gone", but could be worded better for my specific use case), and I can kinda tell that it is synced (green check, but it's a little small and hard to see in my terminal theme), but the only way to tell that a branch is untracked is to look for the lack of any of the aforementioned suffixes. And that, especially combined with having showDivergenceFromBaseBranch turned on, makes it really hard for to scan and see which branches I have yet to push to remote.

Describe the solution you'd like I would like some clear easily scannable modification to the branch line so I can quickly tell which branches I have yet to push. Whether this is a color, a prefix, a suffix, words, an icon, I don't care. Just as long as it is obvious at a glance. Ideally this would be on by default, but I'm also happy for it to be behind a config setting if other people don't want to see it.

Describe alternatives you've considered I don't really have any alternate ideas other than dealing with it like I have been so far.

Additional context N/A

thislooksfun avatar Sep 26 '24 21:09 thislooksfun

I don't have this problem myself, for me the presence or absence of the green checkmark or the yellow up/down arrows is enough indication.

That said, I wouldn't be opposed to adding something else in addition to that; I am just a little worried that it makes the UI more noisy, so maybe it would have to be configurable. That's hard to say without a more concrete idea of what exactly it would be though, so making more concrete suggestions is probably the way to move this forward.

stefanhaller avatar Sep 27 '24 08:09 stefanhaller

I don't have this problem myself, for me the presence or absence of the green checkmark or the yellow up/down arrows is enough indication.

Fair enough! I think my main issue is my use of showDivergenceFromBaseBranch with a busy base branch (so basically all of my branches are diverged at any given moment, and thus they all have something at the end of the line so I can't just scan for an absence). If I turn that off it'll probably be fine.

That said, I wouldn't be opposed to adding something else in addition to that; I am just a little worried that it makes the UI more noisy, so maybe it would have to be configurable. That's hard to say without a more concrete idea of what exactly it would be though, so making more concrete suggestions is probably the way to move this forward.

Seems reasonable. If I can find some time I'll try messing around with a few options.

thislooksfun avatar Oct 13 '24 06:10 thislooksfun

I don't have this problem myself, for me the presence or absence of the green checkmark or the yellow up/down arrows is enough indication.

Fair enough! I think my main issue is my use of showDivergenceFromBaseBranch with a busy base branch (so basically all of my branches are diverged at any given moment, and thus they all have something at the end of the line so I can't just scan for an absence). If I turn that off it'll probably be fine.

I also have a pretty busy main branch at dayjob, so all of my local branches are always behind, often with 3 or 4 digit numbers of commits. Still doesn't bother me, although I do have to admit that the green checkmarks are a bit hard to discern at first glance between all the divergence noise. I guess I just know which of my branches are untracked, so I don't need a clearer visualization.

Anyway, curious what you come up with.

stefanhaller avatar Oct 13 '24 14:10 stefanhaller