View Single Post
  #22   Spotlight this post!  
Unread 03-01-2010, 18:27
Tanner's Avatar
Tanner Tanner is offline
Registered User
FRC #1261 (Roblions)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Suwanee, GA
Posts: 311
Tanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to behold
Re: C and LabView version control with Git

Quote:
Originally Posted by Nibbles View Post
Ooh I forgot, a diff program is supplied with the file path, 40-character SHA1 hash, and file mode, first the old, then the new (of all places, this is documented in git(1)). If the diff program doesn't recognize those parameters you need a shell wrapper script that will only pass the first and fourth arguments, or pass them with the correct command line switches/order/etc.
Ah. I read about that, but I guess I didn't think about it for the 7 arguments just cause it didn't seem relevant.

Quote:
Originally Posted by Nibbles View Post
For merge, you could try it by hand, see if it writes a new file. If you make one change to a base file, save as A, and then a different one to the base file, save as B, then merge base, A, and B out to C.
I was thinking about doing that, but after playing with lvdiff for and trying to figure out a solution, I got tired. It's worth a shot though.

Quote:
Originally Posted by Nibbles View Post
It could also be that the merge tool doesn't overwrite existing files, in that case you need a shell script that can rename the %A file to something else, perhaps like "mv %A %A.old; LVMerge $O $B %A.old %A; rm %A.old" or something like that (I don't know if that would work the way I think it would, especially on Windows).
Would be a odd possibility, but again something worth trying. It appears Git can do shell scripts so, the gist of what you wrote should work.

I wonder if any of the LabVIEW devs know anything about using Git and all the such.

-Tanner
Reply With Quote