-
Notifications
You must be signed in to change notification settings - Fork 55
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
Apply Format in Place when Revisions Are Provided and End Revision is HEAD #778
Comments
Thanks @haohu321 for the report! Could you clarify what you mean by "impossible to apply formatting using Darker"? Let's try to create a practical use case, maybe that will help me understand:
At this point, you could either
Could you point out which part of this workflow is failing for you? |
Hi @akaihola , thanks for taking a look. This is what's broken for me:
darker forces me to supply Also a minor issue: After |
@haohu321 this is intentional. It only makes sense to modify files on disk when comparing old revisions to the working tree ( If you're comparing already committed revisions ( So it's important to be aware that I'd love to improve the documentation and/or error messages to make this clear – and feel free to challenge this design if you think it doesn't make sense! Thanks for the |
Is your feature request related to a problem? Please describe.
After the user commit changes, it will be impossible for him to apply the formatting using darker. A work around would be reset the commit and then recommit. Or try generate a diff patch and git apply (tried this but doesn't work).
Describe the solution you'd like
Ideally if the end revision is HEAD, we should still allow darker to apply the file changes. Then the user could easily
darker --revision=HEAD^..HEAD .
Describe alternatives you've considered
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: