You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Git reset, run darker and then re-commit. This would be very tedious if the user has a long history of local commit unless the user squash, reset, run darker and then recommit.
Let darker generate a diff then try to apply as git patch. The output from darker can't be applied directly by git apply.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
Hi @akaihola , thanks for taking a look. This is what's broken for me:
$ darker --revision=HEAD^..HEAD .
argument -r/--revision: Can't write reformatted files for revision 'HEAD'. Either --diff or --check must be used.
$ darker -r HEAD^..HEAD .
argument -r/--revision: Can't write reformatted files for revision 'HEAD'. Either --diff or --check must be used.
darker forces me to supply --diff or --check Is this a potential bug?
Also a minor issue: After pip install darker==2.1.1, darker --version always shows 1.2.1 I guess the version needs to be fixed
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: