我想從meta-diff套件中獲取lvdiff以使用Git。LVDiff不工作在Git
我的.gitconfig看起來是這樣的:
[gui]
recentrepo = C:/Users/Tanner/Desktop/FIRST 2010 Beta/Java/LoganRover
[user]
name = Tanner Smith
email = [email protected]
[merge "labview"]
name = LabVIEW 3-Way Merge
driver = 'C:/Program Files/National Instruments/Shared/LabVIEW Merge/LVMerge.exe' 'C:/Program Files/National Instruments/LabVIEW 8.6/LabVIEW.exe' %O %B %A %A
recursive = binary
[diff "lvdiff"]
#command = 'C:/Program Files/meta-diff suite/lvdiff.exe'
external = C:/Users/Tanner/Desktop/FIRST 2010 Beta/lvdiff.sh
[core]
autocrlf = true
lvdiff.sh看起來是這樣的:
#!/bin/sh
"C:/Program Files/meta-diff suite/lvdiff.exe" "$2" "%5" | cat
而且我.gitattributes文件看起來像這樣:
#Use a cusstom driver to merge LabVIEW files
*.vi merge=labview
#Use lvdiff as the externel diff program for LabVIEW files
*.vi diff=lvdiff
但每次我做一個差異,所有的Git返回是:
diff --git a/Build DashBoard Data.vi b/Build DashBoard Data.vi
index fd50547..662237f 100644
Binary files a/Build DashBoard Data.vi and b/Build DeashBoard Data.vi differ
它就像它不使用它,甚至承認我的變化。有任何想法嗎?
剛剛完成我的回答:如果你的文件是二進制文件,你需要通過textconv選項定義它的文本表示。 – VonC 2010-01-02 20:31:22
Textconv?這是什麼? – Tanner 2010-01-02 20:33:21
@Tanner:如果是您在'.gitattributes'文件中添加自定義比較的選項,以引用能夠將二進制文件轉換爲文本表示的程序。請參閱'.gitattribute'手冊頁中的段落「執行二進制文件的文本差異」。 – VonC 2010-01-02 20:44:22