4

I'm just getting started on developing in LabView, it's all new to me.

And i'd like to use git extensions to handle my versioning. Since the source is in a *.vi format, I can't use the normal diff tools, the source is binary.

Fortunately, LabView comes with dedicated diff and merge tools which seems to be very helpful. And I can setup TortoiseGit to use these tools on all *.vi files. It's from this how-to:

https://www.labviewhacker.com/doku.php?id=learn:software:github:getting_started

Is there a way to do the same in Git Extensions? I much prefer git extensions over TortoiseGit.. So I'd rather not be forced to use TortoiseGit.

From what I've found, you can only specify a general diff/merge tool, not different ones for different types of files.

Any help would be appreciated, do anyone know how? :)

bjarven
  • 731
  • 2
  • 10
  • 27

2 Answers2

3

If the output of the diff tool is text, you can view diffs under standard Git using a combination of .gitattributes and .git/config. I hope that Git Extensions would respect this setting.

I recommend reading the Git Attributes chapter of the Pro Git book for details on setting this up, but the idea should be something like

*.vi diff=labview

in your repository's .gitattributes file, and

[diff "labview"]
textconv = labview-diff-tool

in your .git/config.

If the diff tool does not output text, you may find the top response to this question useful, which discusses using a graphical diff tool.

Chris
  • 93,263
  • 50
  • 204
  • 189
  • The output is a graphical block diagram unfortunately. :/ But I'll look into the link you posted, thanks! – bjarven Jan 16 '14 at 09:38
  • 1
    You can do these commands with some quick command line action, too. Here is an example I put together for sqlite3: https://gist.github.com/peteristhegreat/a028bc3b588baaea09ff67f405af2909 – phyatt Jul 08 '16 at 16:22
2

Reference: http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/configlvcomp_thirdparty/

  1. Right-click in any folder (that is not a git project) and select TortoiseGit –> Settings
  2. Click on Diff Viewer tab
  3. Click Advanced -> Add
    1. Extension: .vi
    2. External Program: C:\Program Files (x86)\National Instruments\Shared\LabVIEW Compare\LVCompare.exe %base %mine-nobdcosm -nobdpos
      • -nobdcosm means do not compare the appearance of block diagram objects.
      • -nobdpos means do not compare the size or position of block diagram objects.
  4. Repeat for: .ctl and .llb extensions
JasonMArcher
  • 12,386
  • 20
  • 54
  • 51
Kapur
  • 41
  • 1