我按照here的说明操作,但我无法让他们工作。我在共享主机上使用Git和Gitweb 1.7.5,使用GNU Stow自定义编译和部署,但基本上遵循this howto on Dreamhost(只是分叉,没有做出反映Stow和其他东西的修改)。基本上我修改了我的~/.gitconfig
和/path/to/repo/.gitattributes
和/或/path/to/repo/info/attributes
;既没有奏效。我仍然在gitweb界面中看到这一点。
diff --git a / 2011 / randomdoc.odt B / 2011 / randomdoc.odt
索引5890ee7..168582b 100644(档案)
二进制文件a / 2011 / randomdoc.odt和b / 2011 / randomdoc.odt不同
我做错了什么?它甚至没有显示
答案 0 :(得分:2)
我遇到了同样的问题但经过彻底搜索后发现邮件列表中的解决方案:http://www.spinics.net/lists/git/msg160731.html
像这样修改配置
[core]
repositoryformatversion = 0
filemode = true
bare = true
[diff "odf"]
textconv=odt2txt
修改信息/属性:
*.ods diff=odf
*.odt diff=odf
*.odp diff=odf
修改/etc/gitweb.conf: 推@diff_opts,' - textconv';
重要:正如我所读到的,启用diff_opts可能会导致安全问题,导致git用户执行代码!
我已经意识到你就是那个在名单上写的人了,无论如何,我会把它留在这里以供将来搜索... :)
答案 1 :(得分:0)
gitweb可能
git-oodiff
在git-oodiff内部,您可以轻松扩展您需要的任何其他应用程序的环境:
export PATH="/usr/local/bin/ooutils:$PATH" # e.g.