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

Fix colorMoved in git config example #814

Merged
merged 1 commit into from
Nov 30, 2021
Merged

Fix colorMoved in git config example #814

merged 1 commit into from
Nov 30, 2021

Conversation

maximd
Copy link
Contributor

@maximd maximd commented Nov 30, 2021

According to git documentation for diff.colorMoved, true is not a correct value. default is a correct value and it also matches the "--color-moved support" section of this README.

@dandavison
Copy link
Owner

Actually, true is documented as a valid value for diff.colorMoved in gitconfig: https://git-scm.com/docs/git-config#Documentation/git-config.txt-diffcolorMoved. And it seems to be accepted although not documented as a value for diff --color-moved:

delta(master *) git -P diff --color-moved=true > /dev/null; echo $?
0
delta(master *) git -P diff --color-moved=truex > /dev/null; echo $?
error: color moved setting must be one of 'no', 'default', 'blocks', 'zebra', 'dimmed-zebra', 'plain'
error: bad --color-moved argument: truex
129

However, I think I agree with you that default is better, especially given git's apparently inconsistent handling of true.

Copy link
Owner

@dandavison dandavison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again!

According to [git documentation for diff.colorMoved](https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---color-movedltmodegt), `true` is not a correct value. `default` is a correct value and it also matches the "`--color-moved` support" section of this README.
@dandavison dandavison merged commit 588145e into dandavison:master Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants