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

Stop Infection execution with 0 exit code when git diff filter returns empty result #1600

Merged
merged 4 commits into from Oct 28, 2021

Conversation

maks-rafalko
Copy link
Member

@maks-rafalko maks-rafalko commented Oct 27, 2021

Stop Infection execution with 0 exit code when git diff filter returns empty result (no files to be mutated)

This will improve the speed of CI builds and immediately stop Infection execution.

Example: if README.md is updated on the root of the folder, and Infection is executed with the following command line:

infection --git-diff-filter=AM

then we don't want/need to run Infection against the whole project (as it currently works on master)

Fixes #1599

image

…rns empty result (no files to be mutated)

Fixes #1599

This will improve the speed of CI builds and immediately stop Infection execution.

Example: if `README.md` is updated on the root of the folder, we don't want/need to run Infection against the whole project.
https://www.php.net/manual/en/function.escapeshellarg.php

> On Windows, escapeshellarg() instead replaces percent signs, exclamation marks (delayed variable substitution) and double quotes with spaces and adds double quotes around the string.
@maks-rafalko
Copy link
Member Author

Thank you @sidz @sanmai

@maks-rafalko maks-rafalko merged commit a7ece6f into master Oct 28, 2021
@maks-rafalko maks-rafalko deleted the feature/1599-stop-on-empty-diff branch October 28, 2021 13:48
@maks-rafalko maks-rafalko added this to the next milestone Nov 10, 2021
@maks-rafalko maks-rafalko modified the milestones: next, 0.26.0 Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

git-diff-filter ignored when no changes to src/
3 participants