当前位置: 动力学知识库 > 问答 > 编程问答 >

How to configure git diff for .odt files correctly? I get this error: fatal: unable to read files to diff

问题描述:

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?

分享给朋友:
您可能感兴趣的文章:
随机阅读: