Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Add custom diff in SourceTree

Alessandro Cappello
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 5, 2015

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

0 votes
Alessandro Cappello
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 27, 2016

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

0 votes
injeniero
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 8, 2016

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events