Add custom diff in SourceTree

Hi everyone!

I'm attempting to make it possible to compare and merge MySQL WorkBench files in SourceTree, and in order to do so I created a small shell script that extracts the content of the .mwb file and strips some useless counters from the XML.
Then I added this line to .gitconfig in the project's root:

[diff "mwbdiff"]
        textconv = mwb-diff

and this in the .gitattributes:

*.mwb diff=mwbdiff

 

Now, if I change something on a .mwb, then git diff on console shows the correct differences, and SourceTree does it, too:

Screen Shot 2015-06-06 at 08.37.05.png

 

The problem is that if I try to do the same on already committed versions, I get nothing. Same if I try to merge:

Screen Shot 2015-06-06 at 08.39.31.png

I still get the right output if I try to run GIT from the console like this:

git diff develop feature/four -- test.mwb

I also tried to move the .gitattributes and .gitconfig changes into the global variables, and it actually works in the console, but it didn't help SourceTree.

What am I missing? How can I solve this problem? 

2 answers

Hi!,

I'm running into the same exact problem with SourceTree 2.2.4 on Mac. @Alessandro Cappello, where you able to find a solution?

 

Thanks!

/Simon

Hi Simon,

I gave up on this, it's actually a limitation of SourceTree that cannot be bypassed.
What I'm doing now is just to version the .mwb file without comparison.

Best regards,

Alessandro

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

704 views 3 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you