I want to compare .doc or .docx files with git diff
using textutil
. For example: textutil 'Hello.doc' -convert txt -stdout
. But I cannot figure out how to put that in my configuration file with arguments without writing a new git difftool. I also tried using catdoc, but realized that it doesn't work with .docx. Ideas?
Asked
Active
Viewed 101 times
0

Max Isom
- 98
- 3
- 11
1 Answers
0
Did you try out the instructions in "Defining an External Diff Driver" in Git Help pages?
In git attributes you would specify types for doc and docx and in git config you would specify your conversion proces. Something like ( I have no way of testing this unfortunately)
Attributes
*.docx diff=docxdiff
Config
[diff "docxdiff"]
command = textutil -convert txt -stdout

Andrew C
- 13,845
- 6
- 50
- 57