fix: support Git < 2.26 with bright colors #11915
Merged
+15
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#11847 (comment)
Proposed changes
Git before 2.26 do not support the bright attribute for colors. As a workaround reverse bold is set, which has occasionally derived white foreground colors.
This doeos not change the appearance, except for the situations that #11847 addressed. The workaround for #11847 would have to be done for all Git users with < 2.26
Note: Adding the version to IGitVersion would require a change of all plugins to change this. Even if this is done for 5.0.1 I rather change this at this single usage.
An alternative is to raise LastVersionWithoutKnownLimitations from 2.15 to 2.26, which is a little steep.
I have whish to support 2.25 as that is the version in Ubuntu 20.04, not very important though.
Test methodology
Manual, faking version
Merge strategy
I agree that the maintainer squash merge this PR (if the commit message is clear).
✒️ I contribute this code under The Developer Certificate of Origin.