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

allow only_changed and dry to work together #134

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

jetmore
Copy link

@jetmore jetmore commented Jan 29, 2024

Before this change, if you tried to use dry and only_changed together, it acted as if only_changedwas ignored. There was no code specific toonly_changeddown thedry` code path.

This commit’s solution is to run prettier on the entire code base (as was already being done) and then, before doing any comparisons, reset changes to files that were not modified in the last commit. This simplifies following code as there will only be outstanding changes if they were to files we care about.

It's worth noting that I think as a side effect of this the note about only_changed and file_pattern being mutually exclusive is no longer correct, but I didn't test it

Before this change, if you tried to use `dry` and `only_changed together, it acted as if `only_changed` was ignored.  There was no code specific to `only_changed` down the `dry` code path.

This commit’s solution is to run prettier on the entire code base (as was already being done) and then, before doing any comparisons, reset changes to files that were not modified in the last commit.
@jetmore jetmore mentioned this pull request Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant