Open ankurkotwal opened 1 year ago
@jorgebucaran Could I bump this PR please?
Hi @ankurkotwal, sorry for the delayed response. I appreciate your contribution, but I have some concerns regarding the impact of this change on performance. Have you tested it thoroughly? I noticed that there's no option flag to hide or show the stash either, so this would show by default whenever there's anything in the stash. Do you think it's possible to add this as an option to enhance the user experience?
I was also curious about how often do you use git stash
at all? I never use it, but that's just me.
Thanks for the reply @jorgebucaran. I have tested it with the repos that I use, which are admittedly not that large. I would expect that there isn't a huge performance penalty since we're counting stashes only - these don't scan through directories, just the index.
I can add a feature flag to hide/show this. How would you like it to function? Enable/disable the indicator altogether or just the count or a setting for each? Most other prompts I've used tend to show a stash indicator so I propose always showing the indicator (when one or more stashes are present) but having a feature flag for showing the count. Would you be happy with that?
I use git stash semi-regularly and do find this useful. Usually its when I'm working on changes and need to pull the repo before committing. I'll stash my changes, pull the repo, reapply the stash and resolve the conflicts (if any) - I prefer this to having a commit for the change and another for the merge. Hope that helps.
I can add a feature flag to hide/show this. How would you like it to function? Enable/disable the indicator altogether or just the count or a setting for each? Most other prompts I've used tend to show a stash indicator so I propose always showing the indicator (when one or more stashes are present) but having a feature flag for showing the count. Would you be happy with that?
I went ahead and made the stash indicator show by default but only show the count if the variable is set. Feedback welcome.
Adds a git stash indicator when a stash is present. If there are more than 1 stashes present, it will also include a count.