blame: allow blame.coloring
to specify both --color-lines and --color-by-age
#1449
+111
−12
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.
The flags
--color-lines
and--color-by-age
are not mutually exclusive, and both affect the output format ofgit blame
. This adds a test verifyinggit blame
's output when run with both, where previously they were only tested independently.blame
is then taught to accept multiple values fromblame.coloring
, so that both modes can be set by configuration. Previously, the config only permitted one (repeatedLines
) or the other (highlightRecent
), despite the command line accepting both flags independently. This is a backwards-compatible change that does not alter the interpretation of existing configuration.The list-parsing logic was derived from that of
parse_color_moved_ws
indiff.c
.