-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
No pathspec error when using unstage all #11801
Comments
@Hanksha I believe the same scenario will produce errors in vscode as well: |
@vince-fugnitto Works fine in vscode for me: Also there's already a master branch. |
@Hanksha would you like to contribute a fix?
async unstageAll(): Promise<void> {
try {
const { repository, stagedChanges } = this;
const uris = stagedChanges.map(c => c.uri);
- await this.git.unstage(repository, uris);
+ await this.git.unstage(repository, uris, { reset: 'index' });
} catch (error) {
this.gitErrorHandler.handleError(error);
}
} |
@vince-fugnitto Sure I will |
@vince-fugnitto I just saw you did a PR, I was about to create mine. I added a unit test for it as well, do you want me to send it to you so you can add it to your PR? |
@Hanksha sorry I just didn't know when you'd be done and I wanted to get it in for the release, you can open yours and I'll review :) |
@vince-fugnitto Alright, on it. |
Bug Description:
Whenever I use "Unstage All" in the Source Control view, via button (-) or the tab bar dropdown menu, I get this error: "fatal: No pathspec was given. Which files should I remove?"
Steps to Reproduce:
Note that it works fine to unstage a selected file or multiple selected files, it just does that with the unstage all command.
Additional Information
The text was updated successfully, but these errors were encountered: