Clear Filters
Clear Filters

Matlab models GIT - LFS storage. Not able to compare models

12 views (last 30 days)
Hello. I have .slx models stored as LFS in Bitbucket. When I try to compare previous revisions I get mesage:
and truly the file at the location contains just the following.
version https://git-lfs.github.com/spec/v1
oid sha256:a46f1364fc7d03ee20ad71600b77....
size 82305
The LFS is correctly installed. For models stored without LFS the comparing works well. I was told LFS should be set for models (MLD, SLX) otherwise it'll slow the responsiveness of the git. Is there anything I'm missing? Thanks.
  2 Comments
Fabian Stein
Fabian Stein on 19 May 2022
Is there still no solution available, such that the conflict can be resolved within MATLAB? Basically MATLAB would need to create the base/mine/theirs and merged files using the git mergetool command. I would understand that MATLABs git lfs support means that I can use this intuatively.
Fabian Stein
Fabian Stein on 25 May 2022
I just tested it with 2021b, where it works like a charm. According to MATLAB support this has been solved in 2021a.

Sign in to comment.

Accepted Answer

Fabien Jeanneteau Safran
Fabien Jeanneteau Safran on 15 Sep 2021
Hello Vit,
I have the same issue in Simulink 2018b.
As there is not so much documentation on LFS for the version (instead of 2021a), I assumed the feature "Compare LFS objects" is not working/possible in my version.
As a workaround, I configured another Git Client to use the MATLAB Diff executables. Please refer to page https://fr.mathworks.com/help/releases/R2018b/matlab/matlab_prog/customize-external-source-control-to-use-matlab-for-comparison-and-merge.html?s_tid=doc_srchtitle (please check for the MATLAB version you have).
Short story, use following command to get paths for Diff and Merge operations that you will need to give to your other Git Client:
comparisons.ExternalSCMLink.setup
This preference is now enabled: Allow external source control tools to use open MATLAB sessions for diffs and merges. Use the following file paths to customize your external source control client. Diff: /MATLAB/bin/glnxa64/mlDiff Merge: /MATLAB/bin/glnxa64/mlMerge AutoMerge: /MATLAB/bin/glnxa64/mlAutoMerge
For me, it gave:
>>>
This preference is now enabled: Allow external source control tools to use open MATLAB sessions for diffs and merges.
Use the following file paths to customize your external source control client.
Diff: C:\Program Files\MATLAB\R2018b\bin\win64\mlDiff.exe
Merge: C:\Program Files\MATLAB\R2018b\bin\win64\mlMerge.exe
<<<
Hoping it can help you.
  3 Comments
Arman
Arman on 15 Aug 2022
Edited: Arman on 15 Aug 2022
@Vit Kolar Did you happen to have an issue with mergetool also? I can compare using the workaround, but the mergetool still does not work. I get the following error
I tried calling the mergetool from Matlab (right click -> view conflicts) and Git Terminal (git mergetool -t mlMerge . . . ) but neither of them manages to open the file
Vit Kolar
Vit Kolar on 15 Aug 2022
I cannot help here, I use external GIT client. You can do that also, any client works.

Sign in to comment.

More Answers (0)

Categories

Find more on Source Control Integration in Help Center and File Exchange

Tags

Products


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!