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

git: add GitScmProvider.unstageAll unit tests #11806

Merged

Conversation

Hanksha
Copy link
Contributor

@Hanksha Hanksha commented Oct 27, 2022

What it does

Closes #11801.

This PR fixes the missing reset index option when calling unstage which is required to properly unstage all the staged changes. It also adds a unit test for it.

bug

How to test

  1. Create a directory
  2. Run git init in that directory
  3. Create a sample test.txt file
  4. Open Theia with that directory as workspace
  5. Go to Source Control view
  6. Use the Unstage All via the button or tab bar dropdown menu

Review checklist

Reminder for reviewers

Signed-off-by: Vivien Jovet [email protected]

@vince-fugnitto
Copy link
Member

@Hanksha the ECA check is failing since it cannot find [email protected] registered (your personal email was used in the past).

@Hanksha
Copy link
Contributor Author

Hanksha commented Oct 27, 2022

@vince-fugnitto I fixed it, created an account and signed the ECA. I did this on behalf of Toro Cloud so I use that email to sign the commit this time.

@Hanksha
Copy link
Contributor Author

Hanksha commented Oct 28, 2022

@vince-fugnitto Can you have a look at the test again? I changed it to use the actual Git implementation and a git repo on the filesystem.

@Hanksha Hanksha force-pushed the GH-11801-fix-git-unstage-all branch from 3f4b004 to 330eddc Compare October 28, 2022 09:14
@vince-fugnitto vince-fugnitto added the git issues related to git label Oct 28, 2022
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

The new unit test looks good to me 👍
I merged the actual unstageAll fix yesterday for yesterday's v1.31.0 release so you can rebase and squash locally first :)

@Hanksha Hanksha force-pushed the GH-11801-fix-git-unstage-all branch from 2979b09 to db2bb0e Compare October 28, 2022 12:10
@Hanksha
Copy link
Contributor Author

Hanksha commented Oct 28, 2022

@vince-fugnitto Done!

By the way, isn't #11801 missing from CHANGELOG.md for 1.31.0?

Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@vince-fugnitto vince-fugnitto merged commit 1242e28 into eclipse-theia:master Oct 28, 2022
@vince-fugnitto vince-fugnitto changed the title git: fix unstage all and add unit test git: add GitScmProvider.unstageAll unit tests Oct 28, 2022
@Hanksha Hanksha deleted the GH-11801-fix-git-unstage-all branch October 28, 2022 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
git issues related to git
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No pathspec error when using unstage all
3 participants