Skip to content

Add git stash indicator with count (when greater than 1)#45

Open
ankurkotwal wants to merge 3 commits intojorgebucaran:mainfrom
ankurkotwal:stash_indicator
Open

Add git stash indicator with count (when greater than 1)#45
ankurkotwal wants to merge 3 commits intojorgebucaran:mainfrom
ankurkotwal:stash_indicator

Conversation

@ankurkotwal
Copy link

Adds a git stash indicator when a stash is present. If there are more than 1 stashes present, it will also include a count.

@ankurkotwal
Copy link
Author

@jorgebucaran Could I bump this PR please?

@jorgebucaran
Copy link
Owner

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.

@ankurkotwal
Copy link
Author

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.

@ankurkotwal
Copy link
Author

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.

@lukasgierth
Copy link

@jorgebucaran Is this pull request still in consideration? I did my own but deleted it again when i saw that this here does basically the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants