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
Merged

Adding git stash drop for issue 76195 #76342

merged 5 commits into from
Oct 25, 2019

Conversation

drew212
Copy link
Contributor

@drew212 drew212 commented Jun 29, 2019

No description provided.

@drew212
Copy link
Contributor Author

drew212 commented Jun 29, 2019

This is a fix for issue #76195

@drew212
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
Copy link
Member

@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 GIT issues label Jul 3, 2019
@drew212
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
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
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));
Copy link
Member

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"
Copy link
Member

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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a syntax error here.

image

@joaomoreno joaomoreno merged commit d235f18 into microsoft:master Oct 25, 2019
@joaomoreno
Copy link
Member

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/issue_76195 branch October 27, 2019 03:38
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
git GIT issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants