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

Option to show diffs #501

Open
jayvdb opened this issue Dec 26, 2021 · 1 comment
Open

Option to show diffs #501

jayvdb opened this issue Dec 26, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@jayvdb
Copy link
Contributor

jayvdb commented Dec 26, 2021

Is your feature request related to a problem? Please describe.
When running djcodemod in a build worker, it would be useful to show the changes it made so the logs record the transformations made, and also so it is easy to copy the diffs to submit upstream.

This is especially useful when working from tarballs, as there is no VCS to be able to generate diffs.

Describe the solution you'd like
A disabled-by-default flag like --show-diffs which emits the changes which are being written to disk as patch-compatible stdout .

Additional context
e.g. it takes a couple of secs to add
`djcodemod run --removed-in 4.0 test_project/
to the build scripts for https://build.opensuse.org/package/show/home:jayvdb:branches:devel:languages:python:django/python-django-debreach , to allow me to provide a more detailed issue at lpomfrey/django-debreach#21

But I really should check the diffs to make sure djcodemod is not introducing bugs in the process, and if there were diffs I could have easily added to the upstream issue an inline patch for the first which djcodemod knows how to fix, which gets them closer to the harder second problem which djcodemod doesnt know how to solve.

@jayvdb jayvdb added the enhancement New feature or request label Dec 26, 2021
@browniebroke
Copy link
Owner

PR welcome 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants