Skip to content
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

Merged
merged 5 commits into from Oct 25, 2019

Conversation

@drew212
Copy link
Contributor

drew212 commented Jun 29, 2019

No description provided.

@drew212

This comment has been minimized.

Copy link
Contributor Author

drew212 commented Jun 29, 2019

This is a fix for issue #76195

@drew212

This comment has been minimized.

Copy link
Contributor Author

drew212 commented Jul 3, 2019

@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.

@joaomoreno joaomoreno added this to the Backlog milestone Jul 3, 2019
@joaomoreno

This comment has been minimized.

Copy link
Member

joaomoreno commented Jul 3, 2019

@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.

@joaomoreno joaomoreno added the git label Jul 3, 2019
@drew212

This comment has been minimized.

Copy link
Contributor Author

drew212 commented Jul 3, 2019

Ok, done. Let me know if there are other changes you recommend.

extensions/git/package.json Outdated Show resolved Hide resolved
extensions/git/package.json Outdated Show resolved Hide resolved
extensions/git/src/git.ts Show resolved Hide resolved
extensions/git/src/git.ts Outdated Show resolved Hide resolved
extensions/git/package.json Outdated Show resolved Hide resolved
@MJ-Mohith

This comment has been minimized.

Copy link

MJ-Mohith commented Aug 22, 2019

This is really a great feature. I am looking forward to use this feature in our everyday's workflow.
Will it also enable selective drop of stashed contents?

@drew212

This comment has been minimized.

Copy link
Contributor Author

drew212 commented Aug 22, 2019

This is really a great feature. I am looking forward to use this feature in our everyday's workflow.
Will it also enable selective drop of stashed contents?

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));

This comment has been minimized.

Copy link
@joaomoreno

joaomoreno Oct 25, 2019

Member

Compile error here, since index can be undefined.

},
{
"command": "git.stashDrop",
"when": "config.get.enabled && gitOpenRepositoryCount != 0"

This comment has been minimized.

Copy link
@joaomoreno

joaomoreno Oct 25, 2019

Member

Typo here: should be git, not get.

try {
await this.run(args);
}
} catch (err) {

This comment has been minimized.

Copy link
@joaomoreno

joaomoreno Oct 25, 2019

Member

There's a syntax error here.

image

@joaomoreno joaomoreno merged commit d235f18 into microsoft:master Oct 25, 2019
1 of 5 checks passed
1 of 5 checks passed
VS Code Build #20190715.1 failed
Details
VS Code (Linux) Linux failed
Details
VS Code (Windows) Windows failed
Details
VS Code (macOS) macOS failed
Details
license/cla All CLA requirements met.
Details
@joaomoreno

This comment has been minimized.

Copy link
Member

joaomoreno commented Oct 25, 2019

There were more issues which I've commented on. But I went ahead and fixed them and merged the PR. Thanks! 🍻

@joaomoreno joaomoreno modified the milestones: Backlog, October 2019 Oct 25, 2019
@drew212 drew212 deleted the drew212:drew212/issue_76195 branch Oct 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.