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

Do not return all files when checking changed files from last commit #7228

Merged
merged 1 commit into from
Oct 22, 2018

Conversation

rafeca
Copy link
Contributor

@rafeca rafeca commented Oct 20, 2018

Summary

#6732 improved the commands used to check the files that have checked for both Mercurial and Git repositories, but caused a bug on Mercurial repositories.

Turns out that executing hg status -A returns every single file on the repository, which is wrong (and extreeeemely slow for huge repos like FB's one 😅).

This PR changes the arguments passed to the hg command when lastCommit is true to fix the problem.

Test plan

jest-changed-files does not have any tests (which is understandable since testing its functionality is not straightforward), so I've done some manual testing:

  1. Execute manually hg status -amnu --change . <some_folders> on a Mercurial repository and check that it always returns the changed files from the current commit.
  2. Patch this PR into our internal codebase with a WIP version of Jest v24.0.0-alpha.0 and check that our continuous integration tests pass correctly.

@rafeca rafeca force-pushed the improve-find-changed-files branch 2 times, most recently from cdede7c to 9207301 Compare October 21, 2018 11:59
CHANGELOG.md Outdated Show resolved Hide resolved
@rafeca rafeca merged commit 1615a2d into jestjs:master Oct 22, 2018
@cpojer
Copy link
Member

cpojer commented Nov 16, 2018

Does this also print added files?

@rafeca
Copy link
Contributor Author

rafeca commented Nov 16, 2018

Yes, this should print added files (on the last commit)

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants