问题描述:

I thought I had git configured to diff odt files correctly, but when I run $ git diff <commit> I get this error:

/usr/local/sbin/odt2txt: line 2: odt2txt.pl: command not found

fatal: unable to read files to diff

I've installed odt2txt. I'm on Gnu/Linux. I created a file called odt2txt and odt2txt contains this:

#!/bin/bash

odt2txt.pl "$1" -

I $ chmod a+x odt2txt and I put odt2txt in /usr/local/sbin

My .gitattributes looks like this:

*.ods diff=odf

*.odt diff=odf

*.odp diff=odf

*.ods difftool=odf

*.odt difftool=odf

*.odp difftool=odf

Then I ran $ git config diff.odf.textconv odt2txt to configure git to use odt2txt... and that is where I am now. I get the error above, when I try to git diff.

How do I fix this error?

相关阅读:
Top