git diff with fcinfo

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
hoiss
Posts: 3
Joined: Fri Aug 05, 2022 9:33 pm

git diff with fcinfo

Post by hoiss »

Hi,

in Kubuntu 22 I use https://github.com/FreeCAD/FreeCAD/blob ... ols/fcinfo as stated in its help text (.gitconfig and .gitattributes).
But unfortunately it doesn't work as expected:
I only get back a

Code: Select all

diff --git a/file1.FCStd b/file2.FCStd
index 6cb4e24..2987f5f 100644
Binary files a/file1.FCStd and b/file2.FCStd differ
How can I debug and fix this to get it work an see a textual diff?

Thanks for any help,
hoiss
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: git diff with fcinfo

Post by adrianinsaval »

Did you gave the script execution permissions? Also you might need to configure for *.FCStd besides *.fcstd since Linux is case sensitive.
Also, it says to use "git diff" not "diff --git" I'm not sure if diff itself takes the .gitattributes file into account
hoiss
Posts: 3
Joined: Fri Aug 05, 2022 9:33 pm

Re: git diff with fcinfo

Post by hoiss »

The script has execution permissions for everyone.
I now also included both in the gitattributes, *.FCStd and *.fcstd but unfortunately it behaves the same.

The "diff --git" is the beginning of the output of calling "git diff".
Is this not the case on your side?
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: git diff with fcinfo

Post by adrianinsaval »

yeah but I would assume git is calling diff --git individually for each file by default and is supposed to call the script for the configured filetypes, so you have to run git diff, not diff --git, they are different programs. But really, how hard would it have been for you to just try it :?
hoiss
Posts: 3
Joined: Fri Aug 05, 2022 9:33 pm

Re: git diff with fcinfo

Post by hoiss »

But really, how hard would it have been for you to just try it :?
Sorry, maybe I misunderstood you :|
And still not really sure, but I read the help for git diff and tried this:

Code: Select all

$git diff --no-index file1.FCStd file2.FCStd
diff --git a/file1.FCStd b/file2.FCStd
index 2987f5f..11144a9 100755
Binary files a/file1.FCStd and b/file2.FCStd differ
Besides the global ~/.gitattributes file I also modified the repository one accordingly and still can't get a textual diff.
It seems the .gitattributes file is ignored, but how to check where's the problem?
fcinfo can be executed from any terminal, it's in the path.
Are there logfiles or similar available?
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: git diff with fcinfo

Post by adrianinsaval »

hoiss wrote: Wed Aug 10, 2022 7:47 pm Sorry, maybe I misunderstood you :|
apologies, it seems it was I that misunderstood you at the beginning already! I though you where running diff --git in the command line. Then I don't really know what's up, I'll see if I can test around this tonight.
Post Reply