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

Print diff instead of changing files #20

Closed
abhinav opened this issue Jun 2, 2021 · 0 comments
Closed

Print diff instead of changing files #20

abhinav opened this issue Jun 2, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@abhinav
Copy link
Contributor

abhinav commented Jun 2, 2021

We should support a -d flag to print the diff of what would be changed without changing anything.

If the diff was non-empty, the program would exit with a non-zero exit code so that this could be used in scripts like gopatch -d -p foo.patch ./... will return a non-zero exit code and print a diff if foo.patch would change anything.

We'd have to decide how this plays with the -l flag proposed in #19.

@abhinav abhinav added the enhancement New feature or request label Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant