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

--in-git-diff convenience option #245

Open
sourcefrog opened this issue Jan 14, 2024 · 2 comments
Open

--in-git-diff convenience option #245

sourcefrog opened this issue Jan 14, 2024 · 2 comments
Labels
CI Support testing mutants in PRs and CI good first issue Good for newcomers small

Comments

@sourcefrog
Copy link
Owner

For example in a PR or working branch, allow cargo mutants --in-git-diff main, and just run git diff in a subprocess.

@sourcefrog sourcefrog added good first issue Good for newcomers CI Support testing mutants in PRs and CI small labels Jan 14, 2024
@kevinmatthes
Copy link
Contributor

There is also crate for Git interaction which is capable of querying the diffs, as well; https://github.com/rust-lang/git2-rs. Might this be an option, as well?

@sourcefrog
Copy link
Owner Author

That could be an option too, thanks.

The main advantage of using git2-rs that I can think is is that it'll work if there's no git binary available, which seems probably unlikely on machines where people would want to use this. On the downside, it probably pulls in a few compile time dependencies, increasing build time and binary size.

I don't think we'd need anything that would not be easily accessible through the CLI as really just a diff is enough, and it's not performance intensive: we run it only once and it should be trivial time compared to actually generating and running the mutants...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Support testing mutants in PRs and CI good first issue Good for newcomers small
Projects
None yet
Development

No branches or pull requests

2 participants