2

I have the following in my .gitconfig:

[diff "haskell"] textconv=brittany 

I want to invoke diff with this textconv occasionally, but not always, on .hs files.

If I put this in my .gitattributes, then brittany will always be invoked when diffing .hs files:

*.hs diff=haskell 

But I only want to do this sometimes. Is there a way I can tell git from the command line to use the attribute diff=haskell, or tell it to use a particular .gitattributes file?

1 Answer 1

1

Remove or comment out textconv=brittany from .gitconfig, so that git diff(and other commands that generate diff like git show and git log -p) on .hs files does not invoke brittany. When you want to invoke it, use

git -c diff.haskell.textconv=brittany diff 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.