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 Join to answer
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

267 views 0 3
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot