Do not return all files when checking changed files from last commit#7228
Merged
rafeca merged 1 commit intojestjs:masterfrom Oct 22, 2018
Merged
Do not return all files when checking changed files from last commit#7228rafeca merged 1 commit intojestjs:masterfrom
rafeca merged 1 commit intojestjs:masterfrom
Conversation
78ba00d to
ad86b2b
Compare
SimenB
approved these changes
Oct 20, 2018
cdede7c to
9207301
Compare
SimenB
reviewed
Oct 21, 2018
9207301 to
68ce003
Compare
Member
|
Does this also print added files? |
Contributor
Author
|
Yes, this should print added files (on the last commit) |
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 -Areturns 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
hgcommand whenlastCommitistrueto fix the problem.Test plan
jest-changed-filesdoes not have any tests (which is understandable since testing its functionality is not straightforward), so I've done some manual testing:hg status -amnu --change . <some_folders>on a Mercurial repository and check that it always returns the changed files from the current commit.