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 for specifying Git revision to compare against #42

Closed
akaihola opened this issue Aug 7, 2020 · 0 comments · Fixed by #43
Closed

Option for specifying Git revision to compare against #42

akaihola opened this issue Aug 7, 2020 · 0 comments · Fixed by #43
Labels
enhancement New feature or request
Milestone

Comments

@akaihola
Copy link
Owner

akaihola commented Aug 7, 2020

Darker now always compares the working tree against Git HEAD to find out which lines were changed. It would be useful to allow comparisons against other revisions as well. One use case is to compare a feature branch to the branching point so formatting and linting fixes can be done before merging.

This could be implemented with a -r / --revision command line argument, defaulting to HEAD, and being used in darker.git.git_get_unmodified_content(). That function would include the revision when calling git show <revision>:/<path.py>.

@akaihola akaihola added the enhancement New feature or request label Aug 7, 2020
@akaihola akaihola added this to the 1.1.0 milestone Aug 7, 2020
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

Successfully merging a pull request may close this issue.

1 participant