First of all, thank you so much! This extension helps a lot! :smile:
Describe the feature that you'd like
An option to filter the stashes, just like the "Show Remote Branches" checkbox, or list them on the dropdown.
Additional context (optional)
I work with a monorepo shared with 40+ people, with lots of commits every day. When I create a stash, it get lost on the list.
Thanks for raising this feature request! It would definitely be great to make it easier to find stashes within the graph of many commits.
I’m not understanding how having a “Show Stashes” checkbox would make stashes any easier find amongst lots of commits. Wouldn’t this just set whether or not they are filtered out of (not included with) the other the commits already shown - just like remote branches? Please provide some more information to clarify what you are meaning by this.
I don’t think including stashes in the “Branches” dropdown would be an common place that people would instinctively look to quickly find them. From a users perspective, if they clicked a stash when they previously had “Show All” selected, the extension would refresh to only show the stash and its ancestors. If they then decided to apply or pop the stash, then it could look like it had no effect if HEAD is not part of the stashes ancestry (this could be quite confusing). Also, many users have a large number branches in the dropdown, meaning that it’s not necessarily any easier to find them in it. Forcing stashes to be sorted to the top of the branches dropdown seems counterintuitive)
The easiest way I’ve found to find stashes in highly active repos is to use the Git Graph Find Widget, finding the text “stash” (and optionally the revision if known). This is by no means an ideal solution to this problem, it’s just the best I’ve found at the moment.
I've added two new Keyboard Shortcuts in the Git Graph View for scrolling to stashes:
CTRL/CMD + S: Scrolls the Git Graph View to the first (or next) stash in the loaded commits.CTRL/CMD + SHIFT + S: Scrolls the Git Graph View to the last (or previous) stash in the loaded commits.I think these keystrokes will help you quickly find stashes within the large repository you're working in. It also avoids the concerns I raised in my previous reply on the original functionality you were requesting. I'll get user feedback on the keystrokes I've implemented after it's release to see if any additional functionality might be necessary.
This will be available in v1.23.0.
If you'd like to use it before the next release, you can download v1.23.0-beta.1, and install it following the instructions provided here.
I would also like an option to filter out stashes like "Show Remote Branches".
Mostly to be able to hide the stashes which can simplify the graph in cases when checking out certain commits/branches or during rebase etc.
I would also like an option to filter out stashes like "Show Remote Branches".
Mostly to be able to hide the stashes which can simplify the graph in cases when checking out certain commits/branches or during rebase etc.
I agree
I agree! Thank you for the really helpful extention!
Hi @mathiasvr, @iZerus & @Naja415,
Thanks for bringing up this use case (not wanting to see stashes when performing some other task, simplifying the graph), this should definitely be available in Git Graph!
I'll implement "Show Stashes" as an Extension Setting (so it can be set per user & workspace), and in the Repository Settings Widget (so it can set per repository, and quickly from within the Git Graph View). This is consistent with many other settings, for example "Show Tags".
I'll raise a new feature request for tracking the delivery of this additional capability in an upcoming release (and reply to this thread with updates).
Hi @mathiasvr, @iZerus, @Naja415 & @arslivinski,
I've just implemented:
Add an extension setting git-graph.repository.showStashes to control whether stashes are fetched and displayed in the Git Graph View. This setting can be overridden per repository from the Repository Setting Widget.
If you'd like to use it before the next release, you can download v1.29.0-beta.1, and install it following the instructions provided here.
Most helpful comment
Hi @mathiasvr, @iZerus & @Naja415,
Thanks for bringing up this use case (not wanting to see stashes when performing some other task, simplifying the graph), this should definitely be available in Git Graph!
I'll implement "Show Stashes" as an Extension Setting (so it can be set per user & workspace), and in the Repository Settings Widget (so it can set per repository, and quickly from within the Git Graph View). This is consistent with many other settings, for example "Show Tags".
I'll raise a new feature request for tracking the delivery of this additional capability in an upcoming release (and reply to this thread with updates).