Configuring diff --color-words using git-config?

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Configuring diff --color-words using git-config?

From: Frédéric Delanoy <hidden>
Date: 2016-06-15 22:51:21

Hi

Is it possible to use a config option so that "--color-words" is used
as default for diff?

I RTFM'ed git-config but didn't find such an option.

Frédéric

Re: Configuring diff --color-words using git-config?

From: Jeff King <hidden>
Date: 2016-06-15 22:51:21

On Wed, Jun 01, 2011 at 12:12:18PM +0200, Frédéric Delanoy wrote:
Is it possible to use a config option so that "--color-words" is used
as default for diff?
No. And I'm not sure it would be a good idea, as the resulting diffs
would not be able to be applied, which could create some confusion.

Another option would be to use an alias to reduce the amount of typing:

  git config alias.dcw "diff --color-words"

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help