On Thu, Jan 26, 2012 at 8:32 AM, Yann Hodique <[email protected]> wrote: > On Thu, Jan 26, 2012 at 1:20 AM, York Zhao <[email protected]> wrote: >> Hi, >> >> How can I change the "git diff" command used by magit? More specifically, >> somebody committed a huge set of files to repository with crlf line ending. >> So >> when I check diff in magit, everything is different now making it impossible >> to >> see the real difference. I don't want to rewrite the history to fix this in >> the >> repository, instead, I want to pass "--ignore-space-at-eol" to "git diff". I >> have tried this on command line and it works. But how can I tell magit to use >> this option when it sends "git diff" to git? > > (add-to-list 'magit-diff-options "--ignore-space-at-eol") will > probably do what you want
Caveat: Commands that operate on hunks or regions won't work if the diff output doesn't match what's actually in the file. Magit might also tell you that you have modified files without telling you what they are. If it wasn't for that, this would already be a configurable option. -PJ
