Git User Group

cancel
Showing results for 
Search instead for 
Did you mean: 

Poll: Which Git client do you use?

That's a good add-on - since you can read the version...hmm I might look into that too.

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 21 of 25
(1,751 Views)

Previously used Git for text-based languages, so i prefer Git-Bash console. Acording to Labview requirements on LVmerge I suppose to use TortoiseGit GUI due to its ability to perform an external tool for merge expansion.

Question to those who use console Git. Is there any way to modify .gitconfig file to allow use LV merge via console version? 

0 Kudos
Message 22 of 25
(1,640 Views)

Here is an article on how to set it up.

https://www.sasworkshops.com/setting-up-lvcompare-and-lvmerge/

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
Message 23 of 25
(1,622 Views)

LVCompare and LVMerge ship with LabVIEW, is there something special about the one you're referencing in GitHub?  I always thought that it started there and then it was officially adopted into LabVIEW.

 

Also, based on my searches, I found that many people required a wrapper script because Git didn't provided absolute paths and something about order of the arguments IIRC.

 

#!/bin/bash
# Args:  \"$REMOTE\" \"$LOCAL\"
# Only works with diff, not for difftool

# Method to determine absolute path
# The -W parameter on the pwd command is necessary to return the Windows version of the path.
# Not using the -W parameter will result in a conversion of temp directory to a 'tmp' path meaningful only in the Linux
# environment.
# Piping the result through tr '/' '\\' translates the forward slashes to backslashes.
# Windows understands forward slashes, but LVCompare.exe does not.

abspath () {
	(
	DIR=$(dirname "$1")
	FN=$(basename "$1")
	cd "$DIR"
	printf "%s/%s" "$(pwd -W)" "$FN" | tr '/' '\\'
	)
}

lvcompare="C:\Program Files (x86)\National Instruments\Shared\LabVIEW Compare\LVCompare.exe"

local=$(abspath "$4")
remote=$(abspath "$3")


echo Launching "$lvcompare"

#echo Launching "$lvcompare" -nobdpos -nofppos "$local" "$remote"
exec "$lvcompare" -nobdpos -nofppos "$local" "$remote"

 

 

 

0 Kudos
Message 24 of 25
(1,604 Views)

The Github repository I point to in my blog post is for a wrapper, just written in LabVIEW. You still need the lvcompare.exe and lvmerge.exe which come with and are automatically installed by LabVIEW Professional.

That Github repo is all open-source so you can go check out exactly what it is doing. It works, so I never really had the need. It does have something to do with absolute versus relative paths, but I don't know all the details.

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
0 Kudos
Message 25 of 25
(1,596 Views)