git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] blame: allow blame.coloring to specify both --color-lines and --color-by-age
@ 2023-02-02 19:16 Robert Estelle via GitGitGadget
  2023-02-02 19:16 ` [PATCH 1/3] blame: add test for --color-lines + --color-by-age Robert Estelle via GitGitGadget
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Robert Estelle via GitGitGadget @ 2023-02-02 19:16 UTC (permalink / raw)
  To: git; +Cc: Robert Estelle

The flags --color-lines and --color-by-age are not mutually exclusive, and
both affect the output format of git blame. This adds a test verifying git
blame's output when run with both, where previously they were only tested
independently.

blame is then taught to accept multiple values from blame.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 in
diff.c.

Robert Estelle (3):
  blame: add test for --color-lines + --color-by-age
  blame: document --color-{lines,by-age} config
  blame: support multiple values in blame.coloring

 Documentation/blame-options.txt |  4 ++
 Documentation/config/blame.txt  |  1 +
 builtin/blame.c                 | 47 ++++++++++++++++------
 t/t8012-blame-colors.sh         | 71 +++++++++++++++++++++++++++++++++
 4 files changed, 111 insertions(+), 12 deletions(-)


base-commit: 2fc9e9ca3c7505bc60069f11e7ef09b1aeeee473
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1449%2Frwe%2Fblame-color-config-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1449/rwe/blame-color-config-v1
Pull-Request: https://github.com/git/git/pull/1449
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-02-02 19:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-02 19:16 [PATCH 0/3] blame: allow blame.coloring to specify both --color-lines and --color-by-age Robert Estelle via GitGitGadget
2023-02-02 19:16 ` [PATCH 1/3] blame: add test for --color-lines + --color-by-age Robert Estelle via GitGitGadget
2023-02-02 19:16 ` [PATCH 2/3] blame: document --color-{lines,by-age} config Robert Estelle via GitGitGadget
2023-02-02 19:16 ` [PATCH 3/3] blame: support multiple values in blame.coloring Robert Estelle via GitGitGadget

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).