Open evur opened 1 year ago
@evur FYI, you can install GitLens to provide a stashes view and much more.
I think this feature should be in the integrated Git extension. Also, the view in GitLens is different from what I described.
@evur Other than the "Delete All Stashes" button, what else is missing from the GL Stashes view?
In my opinion, a Git stash view in the integrated extension should look a bit different. To me it looks like the GitLens version has it's own style.
For example: The number in the title bar is inside parenthesis. In the integrated extension, the number of changes is shown as a badge.
GitLens:
VS Code Git extension:
Another example: The files' states are shown as icons to the left of them.
GitLens:
On the other hand, they are shown as colored letters in VS Code.
VS Code:
This also allows showing the file type.
Additionally, I would use different icons so they are more in line with the integrated extension.
Thanks for the feedback. There isn't much I can do about the number of stashes (extensions have very limited ability for badges like that), but in the 13.6 version of GitLens (coming out tomorrow) I was able to find a way to leverage the theme icons in our views:
This looks good. But I still think this should be part of the builtin extension. The GitLens workflow doesn't fit everyone.
This looks good. But I still think this should be part of the builtin extension. The GitLens workflow doesn't fit everyone.
+1, gitlens is way too bloated for me.
The latest VS Code Insiders release contains a new command, "Git: View Stash..." that you can use to view a stash using the multi-file diff editor. The multi-file diff editor also contains editor title action to apply/pop (alt command), and drop the stash that is being viewed. Please give it a try and let me know what you think. Thanks!
@lszomoru The view is really nice. But in addition to that, there should be a list of stashes under the "Source Control" tab. This would give the developer a nice overview. Clicking on a stash in the list should then invoke the multi-file diff editor. Like the "Changes" section, the list entries/stashes should also have buttons for apply, pop (could also be on the apply button, like the multi-file diff editor), drop and branch (git stash branch
). This would complement the multi-file diff editor and enable a fast workflow for Git stashes in VS Code.
I'm looking forward to see the further development of this.
@lszomoru You can also refer to https://marketplace.visualstudio.com/items?itemName=arturock.gitstash for some inspiration.
@wenfangdu It can be even simpler than that with the new editor. It would just need to be a list of stashes, which show the multi-file diff editor on click and additionally have some buttons for managing them.
@lszomoru I noticed the collapse button is missing from the right side, is it a bug?
I would have to defer to @hediet on that one.
@lszomoru I noticed the collapse button is missing from the right side, is it a bug?
Please create a new issue. The collapse button seems to be present in your screenshot!
@hediet It's only present on the left side, not on the right side, but expand shows on both sides:
@hediet, @wenfangdu - filed https://github.com/microsoft/vscode/issues/203793
@lszomoru git.stashView
should respect diffEditor.hideUnchangedRegions.enabled
and support workbench.action.compareEditor.previousChange
and workbench.action.compareEditor.nextChange
, a normal diff editor supports all of these.
@wenfangdu, could you please file a separate issue for that? Thanks!
Is this still being considered?
Add a git stash view under the source control tab which shows a list of stashes and has buttons to apply, pop or drop on every stash in the list. There should also be a button to push staged changes to a new stash and a button delete all stashes with a confirmation dialog.
I think this would be much more usable than the current approach with menu entries.