-
Notifications
You must be signed in to change notification settings - Fork 29k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding git stash drop for issue 76195 #76342
Conversation
This is a fix for issue #76195 |
@joaomoreno should the menu item have "..." since this is an action that results in the drop-down menu to select the stash to drop, not sure about the style here. |
Yeah, that's the usual pattern. |
Ok, done. Let me know if there are other changes you recommend. |
This is really a great feature. I am looking forward to use this feature in our everyday's workflow. |
Yes! The way I've designed this you can selectively drop a stash. Waiting on @joaomoreno to approve or request more changes. |
@@ -1209,6 +1209,10 @@ export class Repository implements Disposable { | |||
return await this.run(Operation.Stash, () => this.repository.popStash(index)); | |||
} | |||
|
|||
async dropStash(index?: number): Promise<void> { | |||
return await this.run(Operation.Stash, () => this.repository.dropStash(index)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compile error here, since index
can be undefined
.
}, | ||
{ | ||
"command": "git.stashDrop", | ||
"when": "config.get.enabled && gitOpenRepositoryCount != 0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo here: should be git
, not get
.
try { | ||
await this.run(args); | ||
} | ||
} catch (err) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were more issues which I've commented on. But I went ahead and fixed them and merged the PR. Thanks! 🍻 |
No description provided.